473,569 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Security .SecurityExcept ion thrown when running app from network drive.

Hello!

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

Thanks!

/David.
Nov 15 '05 #1
2 7055
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.REMOV E!> wrote in message
news:eK******** ******@TK2MSFTN GP11.phx.gbl...
Hello!

When I am trying to run my .NET application from a network drive a
System.Security .SecurityExcept ion 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.REMOV E!> wrote in message
news:eK******** ******@TK2MSFTN GP11.phx.gbl...
Hello!

When I am trying to run my .NET application from a network drive a
System.Security .SecurityExcept ion 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 'System.Security.SecurityException' has occurred". Anybody has any idea to resolve this issue? Appreciate any advise.
1
1781
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: Request failed" I have my project files on a network share drive on our
1
4439
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. Then, I use Process() to start the batch. In my local machine, the app runs just fine. But the users
1
1148
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 System.Security.SecurityException, even in directories that I have read/write privileges to. The program is not my code, and I'm not familiar with security stuff except at...
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 Function prevInstance() As Boolean Dim pProcess As Diagnostics.Process() pProcess =...
6
5686
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 system.security.permissions.securitypermission when i try to run the program.
1
1564
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 System.Security.SecurityException has accured when we try and run it. The application is a Executable the network administrator do not want to add the...
5
8284
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 by the security policy. To grant this application the required permission please contact your system administrator or change the application's...
1
9235
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' occurred in mscorlib.dll Error occurs in ReadRegistry key SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU : Requested registry access is not...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5222
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.