473,770 Members | 6,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SecurityExcepti on 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 (SecurityExcept ion
System.Security .Permissions.Re gistryPermissio n) 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 1698
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.c omwrote in message
news:11******** *************@e 9g2000prf.googl egroups.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 (SecurityExcept ion
System.Security .Permissions.Re gistryPermissio n) 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
8048
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 attempted to perform an operation not allowed by the security policy. The operation required the SecurityException. To grant this application the required permission please contact your system administrator, or use the Microsoft .NET security policy...
1
1804
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
2
7071
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
4229
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 a UNC or network share, I get a SecurityException on the following line: Dim args() As String = Environment.GetCommandLineArgs() Has anyone seen this before? Is there something special I need to do
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 = Diagnostics.Process.GetProcessesByName(System.Diagnostics.Process.GetCurrent
0
1205
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 greatly appreciated. Im using C# to make a DLL for my web application to use as an object(ActiveX). Everything works fine until my dll starts to call the tcplistener.Start(). It works fine when i test it as a console application but when used...
1
1008
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 Projects (something like this) I'm getting a SecurityException was unhandled.. Request for the Permission of type 'System.Secuirty.Permissions.SecurityPermision'... when i try to debug the application.
4
2330
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 2003 that connects to a SQL server database and authenticates itself using windows authentication. The web application is configured to impersonate a local user account that has been granted access to the database. Here's the impersonation snip...
5
8331
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 trust level in the configuration file. Exception Details: for the permission of type
0
9591
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6676
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.