473,785 Members | 2,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET Security Policy question - SecurityExcepti on

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 SecurityExcepti on. To grant this
application the required permission please contact your system
administrator, or use the Microsoft .NET security policy administration
tool"

I then noticed that I have to make the assembly trusted on the client
workstation (through .NET Configuration 1.1->Runtime Security Policy) -
which I did and the problem disappeared. When I recompiled the code however,
the same problem appeared again and I had to go through the same process to
make the new executable trusted on the client workstation.

The reason for using shortcuts on the workstations is so that I maintain the
app at a single location and without having to touch the client
workstations. What happens with the Security Policies on the workstations
though? Is there a better way of doing this?

Thanks
Ioannis Demetriades

Jul 21 '05 #1
2 8049
Ioannis-

The default security policy for .NET applications does not allow
applications to do everything when they are run from another computer (e.g.,
within the Intranet zone).

When you trust an application, that is only good for that compiled instance.
This prevents someone from replacing an executable that has been trusted and
allowing it to run with full trust.

You can set up a security policy with caspol.exe. Here is a series of
articles that might get you off to a good start:
http://msdn.microsoft.com/library/de...lCaspolexe.asp

Hope that helps,
--
Marc Butenko
mb******@bresna n.net

"Ioannis Demetriades" <id**********@y ahoo.co.uk> wrote in message
news:uU******** ******@TK2MSFTN GP12.phx.gbl...
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 SecurityExcepti on. To grant this application the required permission please contact your system
administrator, or use the Microsoft .NET security policy administration
tool"

I then noticed that I have to make the assembly trusted on the client
workstation (through .NET Configuration 1.1->Runtime Security Policy) -
which I did and the problem disappeared. When I recompiled the code however, the same problem appeared again and I had to go through the same process to make the new executable trusted on the client workstation.

The reason for using shortcuts on the workstations is so that I maintain the app at a single location and without having to touch the client
workstations. What happens with the Security Policies on the workstations
though? Is there a better way of doing this?

Thanks
Ioannis Demetriades


Jul 21 '05 #2
Ioannis-

The default security policy for .NET applications does not allow
applications to do everything when they are run from another computer (e.g.,
within the Intranet zone).

When you trust an application, that is only good for that compiled instance.
This prevents someone from replacing an executable that has been trusted and
allowing it to run with full trust.

You can set up a security policy with caspol.exe. Here is a series of
articles that might get you off to a good start:
http://msdn.microsoft.com/library/de...lCaspolexe.asp

Hope that helps,
--
Marc Butenko
mb******@bresna n.net

"Ioannis Demetriades" <id**********@y ahoo.co.uk> wrote in message
news:uU******** ******@TK2MSFTN GP12.phx.gbl...
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 SecurityExcepti on. To grant this application the required permission please contact your system
administrator, or use the Microsoft .NET security policy administration
tool"

I then noticed that I have to make the assembly trusted on the client
workstation (through .NET Configuration 1.1->Runtime Security Policy) -
which I did and the problem disappeared. When I recompiled the code however, the same problem appeared again and I had to go through the same process to make the new executable trusted on the client workstation.

The reason for using shortcuts on the workstations is so that I maintain the app at a single location and without having to touch the client
workstations. What happens with the Security Policies on the workstations
though? Is there a better way of doing this?

Thanks
Ioannis Demetriades


Jul 21 '05 #3

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

Similar topics

0
3366
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 trying to run. Anyone got some ideas on where I can start in getting this worked out? I've posted in Exchange but I'm thinking this group may actually have more ideas. Security Exception Description: The application attempted to perform an...
0
539
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 trying to run. Anyone got some ideas on where I can start in getting this worked out?. Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required...
19
3225
by: Diego F. | last post by:
I think I'll never come across that error. It happens when running code from a DLL that tries to write to disk. I added permissions in the project folder, the wwwroot and in IIS to NETWORK_SERVICE and Everyone, with Full Control to see if it's a permissions problem. The project is hosted in a Windows 2003 Server and developed from PCs in a domain, developing with Visual Studio 2005 Beta 1. -- Regards,
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
2
1399
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...
5
2467
by: CyberLotus | last post by:
Hi, I've created a web application and through this I want to import Excel data to database. Following is the code that I've written, ******************************************************************* string fileLocation = txtboxFileName.Text.ToString(); string sheetName = "Import"; string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
2
2301
by: John Kotuby | last post by:
Hello all, Note: This is the full version of a Post that I inadvertently sent before it was complete. About a year ago I wrote a VB.NET 2003 solution that consists of a number of assemblies (1 EXE and 15 DLLS). As I recall, in order to deploy the solution to a testing server I simply copied the contents of the Bin folder in the development area where the compiled assemblies reside. Be patient with me here, because I haven't used...
4
9095
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 required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Permission denied" This is what I am doing. we had an app that...
5
8337
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
9645
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
10329
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
10152
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...
0
8974
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
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
5381
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...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2880
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.