.NET Security Policy question - SecurityException

  • Thread starter Ioannis Demetriades
  • Start date
I

Ioannis Demetriades

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
 
M

Marc Butenko

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/d...singCodeAccessSecurityPolicyToolCaspolexe.asp

Hope that helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top