Inheritance security rules violated by type: 'MvcPages.MvcPage'. Derived types must either match the security accessibility of the base type or be less accessible.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Inheritance security rules violated by type: 'MvcPages.MvcPage'. Derived types must either match the security accessibility of the base type or be less accessible.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TypeLoadException: Inheritance security rules violated by type: 'MvcPages.MvcPage'. Derived types must either match the security accessibility of the base type or be less accessible.]
System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) +0
System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +41
System.Reflection.Assembly.GetType(String name) +14
System.Web.WebPages.Razor.RazorBuildProvider.GetGeneratedType(CompilerResults results) +235
System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results) +72
System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results) +16
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +9881921
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +299
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +103
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +165
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +43
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(String virtualPath, Type requiredBaseType) +28
System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType(String virtualPath) +343
System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance(IVirtualPathFactory factory, String virtualPath) +236
System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType(String virtualPath) +261
System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance(IVirtualPathFactory factory, String virtualPath) +132
System.Web.WebPages.WebPageHttpHandler.CreateFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory) +58
System.Web.WebPages.WebPageHttpHandler.CreateFromVirtualPath(String virtualPath) +59
System.Web.WebPages.WebPageRoute.DoPostResolveRequestCache(HttpContextBase context) +462
System.Web.WebPages.WebPageHttpModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +157
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69