Author: turfnsurf4me | Posted on: 2/1/2007 6:19:01 AM | Views : 361

I've written this custom class (dll)  to incorportate into my asp.net 2.0 web application. I add the dll to the web applications bin directory. Make a reference to it in the project. In one my web pages I make a reference to the dll,  and try to access one the methods in the class. When I compile the application I keep getting  "inaccessible due to its protection level" compile error.

I've have researched (googled) this for a day now and nothing seems to fix it. Here's what I've done

Using Visual Studio 2005 (.NET 2.0)
Using the Web Application Project ( this was after installing a service pack for the IDE)

My custom class has ALL public static methods. There are NO private methods or members
I've tried the putting this in my custom class

 [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
 [AspNetHostingPermission(SecurityAction.InheritanceDemand, ...

Go to the complete details ...