469,889 Members | 1,268 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

System.Security.SecurityException

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\FrmStart up.vb:line 4
The granted set of the failing assembly was:

<PermissionSet class="System.Security.PermissionSet" version="1">
<IPermission class="System.Security.Permissions.EnvironmentPerm ission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1" Read="USERNAME"/>
<IPermission class="System.Security.Permissions.FileDialogPermi ssion,
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.


Jul 21 '05 #1
1 6385
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/archiv.../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.
--------------------
From: "Sam" <sm*****@arvo.org>
Subject: System.Security.SecurityException
Date: Thu, 5 Feb 2004 18:44:00 -0500
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uh**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 205.219.50.65
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP12.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.general:123858
X-Tomcat-NG: microsoft.public.dotnet.general

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\FrmStar tup.vb:line 4
The granted set of the failing assembly was:

<PermissionSet class="System.Security.PermissionSet" version="1">
<IPermission class="System.Security.Permissions.EnvironmentPerm ission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1" Read="USERNAME"/>
<IPermission class="System.Security.Permissions.FileDialogPermi ssion,
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.


Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by James B | last post: by
1 post views Thread by Sam | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.