Security Exception Was Unhandled - Projects Stored On Network Drives

This question is related to another on which I believe was never properly resolved.

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=158316&SiteID=1

I have the same problem with using the C# Browser Object from a project file that is stored on a network drive.

The workaround was to store the projects folder on a local drive.

I need the resolution and not the workaround because my data and projects are stored under my documents which is a redirected network drive on a W2K3 for SBS server that has routine backups of my documents content.



Answer this question

Security Exception Was Unhandled - Projects Stored On Network Drives

  • SecurityAdmin

    Haven't tried it myself, but I believe this is caused by the default .NET policies forbidding code execution from network drives. Open up mscorcfg.msc (located somewhere in the .NET SDK I believe), go to Runtime Security Policy -> Machine -> Anything with LocalIntranet. You need to fiddle with these settings somehow (don't ask me how) to get network drive compilation working.



  • Gino Rojas Tillemann

    Didn't work for me. any other cluese...


  • Alexander75

    Thank you for your reply. 

    Your mention of enabling network drive compilation lead me to search for security settings while the .Net SDK was downloading.

    I am not certain of the specific security settings that are required for this type of application but I have discovered that enabling "ClickOnce Security Setting" and checking "This is a full trust application" from project menu -> project properties -> security tab permits the application to run without the security exception.

    UPDATE:

    After enabling Dynamic Help in the VS C# 2005 EE IDE and clicking on the WebBrowser control the Dynamic Help listed a link for "WebBrowser Security".  Viewing this link states that the WebBrowser control is designed to work in full trust only.


  • Security Exception Was Unhandled - Projects Stored On Network Drives