Running .NET apps from a network share

by Sander Gerz March 24, 2006 11:19

Yesterday, at the dotNed meeting, the question came up why running an .NET application from a network location, such as a share, doesn't work and generates a Security Exception. It seems this question is raised every once in a while, so here's a quick solution using caspol.exe. The reason for it being quick is mainly because caspol can be run from the command-line. Alternatively, you can use the Microsoft .NET Framework 2.0 Configuration Tool, or the Trust Assemblies Location property in Visual Studio (which is useful only during development.).

To grant full trust to a network folder

  • Type the following command in the Visual Studio Command Prompt:

    caspol -m -ag LocalIntranet_Zone -url \\<ServerName>\<FolderName>\* FullTrust -n "<Name>" -d "<Description>"

[source]

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen | Modified by Mooglegiant