472,378 Members | 1,236 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 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 6598
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.