473,394 Members | 1,679 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,394 software developers and data experts.

.NET Security Policy question - SecurityException

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 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 8019
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******@bresnan.net

"Ioannis Demetriades" <id**********@yahoo.co.uk> wrote in message
news:uU**************@TK2MSFTNGP12.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 SecurityException. 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******@bresnan.net

"Ioannis Demetriades" <id**********@yahoo.co.uk> wrote in message
news:uU**************@TK2MSFTNGP12.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 SecurityException. 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
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...
0
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...
19
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...
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...
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...
5
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, ...
2
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...
4
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
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...

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.