Inheritance Security Rules Violation

Topics: User Forum
Feb 18, 2011 at 9:17 PM

I have just tried to put MWPSK onto a GoDaddy hosting account.     I'm getting the following error when attempting to go out there and get it set up.    

I've reapplied security on all the folders in MSPSK to make sure that the application can read/write to them.    I've tried setting up a virtual directory for it in IIS as well, but that doesn't seem to do anything.

Does it just not work with IIS7 / ASP 4?

 

Inheritance security rules violated by type: 'MyWebPagesStarterKit.Controls.HomepageContentDesigner'. 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: 'MyWebPagesStarterKit.Controls.HomepageContentDesigner'. 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: 'MyWebPagesStarterKit.Controls.HomepageContentDesigner'. Derived types must either match the security accessibility of the base type or be less accessible.]
   System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) +0
   System.Reflection.RuntimeAssembly.GetExportedTypes() +38
   System.Web.Compilation.BuildResultMainCodeAssembly.FindAppInitializeMethod() +31
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8777050
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +387
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +248

[HttpException (0x80004005): Inheritance security rules violated by type: 'MyWebPagesStarterKit.Controls.HomepageContentDesigner'. Derived types must either match the security accessibility of the base type or be less accessible.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421
   System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +605

[HttpException (0x80004005): Inheritance security rules violated by type: 'MyWebPagesStarterKit.Controls.HomepageContentDesigner'. Derived types must either match the security accessibility of the base type or be less accessible.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8946484
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Apr 5, 2011 at 6:03 PM

It doesn't seem to work with .NET 4.0 out of the box, I had to switch my app to .NET 2.0 in IIS.

Jun 10, 2011 at 7:05 AM

Hello,
which is a solution to solve this problem?
thanks
 

Jun 12, 2011 at 8:25 PM

In IIS, try changing the application from .NET 4.0 to .NET 2.0. I did that and it worked for me.

Dec 20, 2011 at 5:19 AM

Anyone know how to get it working in dotnet 4.0?  I need to get this working on my winhost server but i need it in dotnet 4.0 as other things i host on the site are dotnet 4.0.  This just would have been a great app to use to post info about my apps etc but for the life of me i can't get around that security violation and the server is meant to be full trust.