473,414 Members | 1,878 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 6743
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James B | last post by:
OMA (Outlook Mobile Access) under Exchange is giving me a System.Security.SecurityException error. From what I gather this is a problem with the security level under which the OMA application is...
0
by: Brian A | last post by:
I have code that calls some Win32 code. My library is accessed via remoting from a client. In version 1.0 of the framework I had no problems. With 1.1 I consitently get the securityException: ...
2
by: MFRASER | last post by:
I am getting a System.Security.SecurityException when I try and laod a dataset from an xml file any ideas on what would cause this? System.Security.SecurityException' occurred in mscorlib.dll ...
0
by: Luis Esteban Valencia | last post by:
Hello I have this error when I submit the page with the following code. I had never see this kind of errors. Thanks private void btnsubmit_Click(object sender, System.EventArgs e) { ...
1
by: Sam | last post by:
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...
3
by: steveeisen | last post by:
microsoft.public.dotnet.languages.vb.upgrade isn't getting much traffic, so I'll try here. Ours is a VB6 shop exploring .NET. First I wrote a new application with VB .NET 2003 to create a...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: Siberwulf | last post by:
I'm trying to fetch an XML document from a website through an assembly i built and attached to SQL 2005. Here is my code for the SPROC assembly: public static void fetch_FeedData(string...
4
by: confused1234 | last post by:
I get the error at the bottom of this post when i click on a linkbutton, javascript:__doPostBack('ctl00$Main$btnchangeemail','') The problem is intermitant, sometimes it works and sometimes...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.