Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am fairly new to the VB.net side of the programming and have just converted an EXE and Outlook Addin from VB6 to .Net.

I have both the Outlook Addin and Application running correctly from the development application Visual Studio, but the compiled EXE of the application needs to be run from across a network mapped drive and I get the following error

 

An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll

 

Additional information: Request for the permission of type System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

 

Can anyone help me with this. I have modified the .net security for the computer and user under control Panel - Administrative tools - .Net security

Posted

You need to set the Security Policy to allow either your specific from a networked drive or any application from a networked drive.

 

If you will always have admin access and are not worried about any malicious applications running on the network, the easiest way to do this is to use the caspol.exe program in the Windows Dir/Microsoft .Net/Framework/V1.* directory

 

create a batch file calling caspol with the parameter -s off

ex. caspol -s off

 

if you want more refined control, look up caspol on msdn

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...