title: Request for the permission of type 'System.Web.AspNetHostingPermission' failed when compiling web site on a Network Share or Intranet Project
body: <p>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 an intranet server. When I have the website open in Visual Studio 2008 and try to debug it, I receive the following compiler error:</p>
  
  <p><strong>Request for the permission of type 'System.Web.AspNetHostingPermission' failed</strong> </p>
  
  <p>To resolve this issue on Windows Vista machines, I would change the machine's .NET Security Configuration trust level to full for the local intranet (<a href="http://dotnetslackers.com/Security/re-50692_System_Web_AspNetHostingPermission_when_Accessing_Network_or_Intranet_Projects_using_Visual_Studio_2005.aspx" rel="noreferrer">fix outlined here</a>). 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 <a href="http://support.microsoft.com/?id=320268" rel="noreferrer">Microsoft Support article</a> running the command below to no avail.</p>
  
  <pre>
  Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url
  "file:////\\computername\sharename\*" FullTrust -exclusive on
  </pre>
  
  <p>Presently, I have the following .NET, ASP.NET, and .NET SDK components installed on my machine</p>
  
  <ul>
  <li>Microsoft .NET Compact Framework 2.0 SP2</li>
  <li>Microsoft .NET Compact Framework 3.5</li>
  <li>Microsoft .NET Framework 4 Client Profile</li>
  <li>Microsoft .NET Framework 4 Extended</li>
  <li>Microsoft .NET Framework 4 Multi-Targeting Pack</li>
  <li>Microsoft ASP.NET MVC 1.0</li>
  <li>Microsoft ASP.NET MVC 2</li>
  <li>Microsoft ASP.NET MVC 2 - Visual Studio 2008 Tools</li>
  <li>Microsoft ASP.NET MVC 2 - Visual Studio 2010 Tools</li>
  <li>Microsoft Windows SDK for Visual Studio 2008 .NET Framework Tools - enu</li>
  <li>Microsoft Windows SDK for Visual Studio 2008 Headers and Libraries</li>
  <li>Microsoft Windows SDK for Visual Studio 2008 SDK Reference Assemblies and IntelliSense</li>
  <li>Microsoft Windows SDK for Visual Studio 2008 SP1 Tools</li>
  <li>Microsoft Windows SDK for Visual Studio 2008 SP1 Win32 Tools</li>
  <li>Microsoft Windows SDK for Windows Server 2008 (6001.18000.367)</li>
  </ul>
  
  <p>Do I need to install the .NET 2.0 SDK? Am I issuing the <code>caspol</code> command incorrectly? Is there something else that I am missing?</p>