473,406 Members | 2,620 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,406 software developers and data experts.

SecurityException when I run an application on local intranet

I am trying to write an application which users will run from intranet
network to determine if some of the software installed or not.
Basically I am getting this information from registry. If software is
not installed, I will either start the appropriate setup.exe or open
the folder containing required setup files to install.

The problem is that I get security exception (SecurityException
System.Security.Permissions.RegistryPermission) if I run this
application from network. I am wondering if there is way to overcome
this by not tweaking any settings on user machine or I am totally in
the wrong direction and there is a better way to do this.

Thanks
Sreekanth

Oct 24 '07 #1
2 1668
If 2.0 (or above), then you can sign and deploy the app using
ClickOnce; then you don't need to change anything on a
client-by-client basis.

Marc
Oct 25 '07 #2
The problem is not what your program does (reading registry or whatever). It
is that fact you are loading .NET code from outside the computer. In .NET
any running code loaded from outside the computer is considered unsafe.

So, you need to configure the running com[uter's .NET code access security
to allow code from intranet or internet to run. If you do not want to do
this configuration, you need to install the code (app) to the computer
(ClickOnce is simply a way of installation).

The configuration, called CAS ( for CODE ACCESS SECURITY), is done with a
tool called CASPOL.exe. With 1.x, there is GUI version of the tool inside
Control Panel. In 2.0, the GUI is not available to .NET redist anymore (only
avialable if you installed .NET2.0 SDK). So you need to learn DOS way (if
you have heard DOS) to do it at command line. Google CASPOL.exe brings you
hundreds of links on how to use CASPOL.exe to configure CAS. With the GUI
tool, you can even make a MSI package, so taht you can deploy the CAD policy
by your domain's group policy.
"Sreekanth" <sr*******************@gmail.comwrote in message
news:11*********************@e9g2000prf.googlegrou ps.com...
>I am trying to write an application which users will run from intranet
network to determine if some of the software installed or not.
Basically I am getting this information from registry. If software is
not installed, I will either start the appropriate setup.exe or open
the folder containing required setup files to install.

The problem is that I get security exception (SecurityException
System.Security.Permissions.RegistryPermission) if I run this
application from network. I am wondering if there is way to overcome
this by not tweaking any settings on user machine or I am totally in
the wrong direction and there is a better way to do this.

Thanks
Sreekanth
Oct 25 '07 #3

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

Similar topics

2
by: Ioannis Demetriades | last post by:
Hi, I created a shortcut to a .NET application that is located on a different workstation but when I try to execute the app (through the shortcut) I get an message saying "The application...
1
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:...
2
by: David Lindgren | last post by:
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.
2
by: jwgoerlich | last post by:
I wrote a simple VB.Net console application. It accepts command line parameters and creates a folder structure. It works on the local file system without a problem If I run the console app from...
5
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...
0
by: Rain | last post by:
Can anyone help me with this? Im just a newbie with C# and my project should be submitted 3 days from now. I would be very grateful for anyhelp at all. Source code or detailed explaination would be...
1
by: Chris Thunell | last post by:
I'm using VStudio2005 and working with a VB.Net windows form application. The project is located in the My Documents folder... under a UNC shared path. \\fs1\users\cthunell\My Documents\My...
4
by: =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?= | last post by:
I'm wrestling with a problem that I'm hoping someone can help me with. I have a web application written in VS.2003 and running on version 1.1 of the .NET Framework on XP pro and Windows server...
5
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...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.