473,490 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

System.Security.SecurityException thrown when running app from network drive.

Hello!

When I am trying to run my .NET application from a network drive a
System.Security.SecurityException exception is thrown. Why is that? How do I
prevent it?

Thanks!

/David.
Nov 15 '05 #1
2 7044
Hi David,

Programs run from network locations are executed with tighter security
restrictions than those run from local computer. I suggest that a program
run from a network falls into the "Local Intranet" code group which has
quite a limited set of permissions. As far as I know, there is no
programmatic way to overcome that. Instead, start the .NET Framework
Configuration tool and add more permissions for the corresponding code
group. You will obviously have to do so for each computer you expect to run
this program from a network on.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"David Lindgren" <da************@hogia.se.REMOVE!> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
Hello!

When I am trying to run my .NET application from a network drive a
System.Security.SecurityException exception is thrown. Why is that? How do I prevent it?

Thanks!

/David.


Nov 15 '05 #2
The reason is because of the different security zones that .NET uses. For
instance, a programming running from another website has almost no local
privileges while those running from a local drive are god-like. When you
run from another share, you are running from an Intranet which has less
rights. Most likely you are receiving the error because you are trying to
do something that an Intranet application is not allowed to do be default.

To solve this you will need to change the .NET configuration for each
machine that this application will run from. You will need to run the .NET
Framework Configuration tool and adjust the Runtime Security Policy to give
you assembly more trust in your environment.

"David Lindgren" <da************@hogia.se.REMOVE!> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
Hello!

When I am trying to run my .NET application from a network drive a
System.Security.SecurityException exception is thrown. Why is that? How do I prevent it?

Thanks!

/David.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
490
by: Seeheng | last post by:
I've created a VB.Net program running perfectly under local hard drive. But when move it to a network path (both UNC name and drive mapping tested), it gave "An exception...
1
1766
by: Zak Taemur | last post by:
Whenever I try to run my application I get the following error: "An unhandled exception of type 'System.Security.SecurityException' occured in WorkFlow-Projects.exe Additional information:...
1
4435
by: edge | last post by:
hi, here it is my problem. My console app, reads a text file where it grabs username/password. Next, my app creates a .BAT file to trigger the command ftp:\\user:password@ftphomeaddress. ...
1
1143
by: Dave Cullen | last post by:
I have an application that runs fine on my development machine, no matter where I copy the files to on the local drive. However if I put the files on our network I get a...
5
1109
by: Jarod_24 | last post by:
How do i prevent getting a System.Security.SecurityException when running my app from a Network Drive? My app stopped when checking for a previous instance of itself using the code: Private...
6
5677
by: alex | last post by:
Hi, this always works: private ConsoleToTextbox myConsole; Console.SetOut(myConsole); But now (a few weeks later i started this project again) i get a non handeld security exception from...
1
1555
by: Phillip Taylor | last post by:
Hi The Visual Basic 2003 application that I wrote was installed on Windows 2003 Server and we are trying to acess it across the network from Windows XP Pro but we are getting An Exception...
5
8277
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
1
9227
by: starrysky | last post by:
Trying to read key "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" value "AUOptions" and get the following : A first chance exception of type 'System.Security.SecurityException'...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7146
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
7183
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...
1
6852
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
7356
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
4573
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...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.