I ran this command on the server that has the share of code that my local IIS site set to (Via UNC to that share):
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on
(obviously I replaced Drive with C, and the actual computername and sharename with the one I'm sharing out).
But when I run the ASP.NET site, I am still getting this runtime exception:
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.