IIS and UNC paths

I installed a .Net 3.5 application onto a Windows 2008 Web R2 (64 bit) What makes this a little unique is that the ASP.Net code is stored on a UNC file share.  Because of this issue, I received the following error:

Security 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.

While searching I came across the caspol solution from Microsoft:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\caspol.exe -m -ag 1 -url “file:////\\fs\share\*” FullTrust -exclusive on

After restarting IIS, all sorted.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s