.NET security exception

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I get the following exception trying to open a folder using the
FolderBrowserDialog control in Visual Studio 2005. This only happens when the
code is running on a mapped drive. How can I avoid this?

System.Security.SecurityException occurred
Message="Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

Source="mscorlib"
StackTrace:
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.FolderBrowserDialog.get_SelectedPath()
at IfGen_Reader.Form1.openToolStripMenuItem_Click(Object sender,
EventArgs e)

Any help would be appreciated!
 
Hi,


IIRC the default install do not allow programs running from the network to
access the filesystem. You need to modify the permission from the Adm. tools
 
Hi,

Go to admin. tools and select .Net Wizard, select "Adjust .net security"
Put full trust to intranet
 
Back
Top