You have a few options, including but not limited to:
- Upgrade your project to .NET 3.5, and ensure that you have .NET 3.5 SP1 installed on your local machine (http://blogs.msdn.com/b/shawnfa/archive/2008/05/12/fulltrust-on-the-localintranet.aspx).
- Change your local CAS policy to grant full trust to assemblies in the network location where you are storing your code. (http://msdn.microsoft.com/en-us/library/2bc0cxhc(v=vs.80).aspx)
- Avoid using whatever it is that is requiring AspNetHostingPermission. (If you share what this is, it might be possible to suggest an alternative.)
Personally, I would opt for moving the code to the local machine for development for reasons that go beyond the CAS permissions problem, but ymmv...
Nicole Calinoiu
2010-09-28 12:37:34