System.Security.SecurityException

S

Sam

I have a desktop VB.Net application I developed locally. I uploaded it to a
file server we have and the .Net Framework is installed on the file server.

When I try to run the executable from the network drive, I get,
"System.Security.SecurityException."

When I Open the solution from the network drive, I get, "The project
location is not fully trusted by the .Net runtime.
And then when I click ok and try to run in debug mode I get
"System.Security.SecurityException" and it stops right at:
Public Class frmStartUp.

Then I get this in the Output window:

Unhandled Exception: System.Security.SecurityException: Request failed.
at NameBadge3up.frmStartup..ctor()
at NameBadge3up.frmStartup.Main() in
H:\ARVOSRC\2004\NameBadge3up\NameBadge3up\FrmStartup.vb:line 4
The granted set of the failing assembly was:

<PermissionSet class="System.Security.PermissionSet" version="1">
<IPermission class="System.Security.Permissions.EnvironmentPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1" Read="USERNAME"/>
<IPermission class="System.Security.Permissions.FileDialogPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/>
..
..
..
..
</PermissionSet>

I guess the local machine doesn't trust the executable because it is on a
different machine.
Can I put something in the code to handle this? I really don't want to
configure the local machine everytime I want to run an executable from
somewhere else. Like if I want to upload what I have to the file server so
a project manager can check it out real quick. I don't want to have to
configure her local machine.
 
S

Shawn Farkas

Hi Sam,

You are correct, you're getting this exception because your code is no longer executing in the MyComputer zone, it is now executing from
the LocalIntranet zone. Check out the following article for help solving your problem:

http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx

-Shawn
http://blogs.msdn.com/shawnfa

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top