Request for the permission of type 'System.Web.AspNetHostingPermission' when compiling web site
Posted
by ahsteele
on Stack Overflow
See other posts from Stack Overflow
or by ahsteele
Published on 2010-05-04T21:16:24Z
Indexed on
2010/05/04
21:18 UTC
Read the original article
Hit count: 352
I have been using Windows 7 for a while but have not had to work with a particular legacy intranet application since my upgrade. Unfortunately, this application is setup as an ASP.NET Website project hosted on a remote server. When I have the website open in Visual Studio 2008 and try to debug it:
Request for the permission of type 'System.Web.AspNetHostingPermission' failed
To resolve this issue on Windows Vista machines I would change the machine's .NET Security Configuration to trust the local intranet. I believe this configuration utility relied upon the mscorcfg.msc which from some cursory research appears to be apart of the .NET 2.0 SDK. I have tried to follow the instructions from this Microsoft Support article running the command below to no avail.
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on
Presently, I have the following .NET and ASP.NET components installed on my machine
- Microsoft .NET Compact Framework 2.0 SP2
- Microsoft .NET Compact Framework 3.5
- Microsoft .NET Framework 4 Client Profile
- Microsoft .NET Framework 4 Extended
- Microsoft .NET Framework 4 Multi-Targeting Pack
- Microsoft ASP.NET MVC 1.0
- Microsoft ASP.NET MVC 2
- Microsoft ASP.NET MVC 2 - Visual Studio 2008 Tools
- Microsoft ASP.NET MVC 2 - Visual Studio 2010 Tools
Do I need to install the .NET 2.0 SDK? Am I issuing the caspol
command incorrectly? Is there something else that I am missing?
© Stack Overflow or respective owner