473,322 Members | 1,403 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,322 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 8014
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.