» home » forums

trusting .net projects from a network location tags:  visual studio, .net, help desk

misterhaan
radar
subject:  trusting .net projects from a network location
posted:  1:02:06 pm, oct 30, 2008

i keep all my source code on hecubus, which means windows workstations running visual studio see that source code as a network location.  i think it knows it’s local intranet, but that group isn’t trusted enough by default to let you do such things as develop a project in visual studio.

for visual studio 2005, there was a .net framework 2.0 configuration control panel under administrative tools.  i think it got installed as part of the .net 2.0 sdk.  i used that to give full trust to local intranet, as my local intranet is just me and my wife.

with visual studio 2008, i don’t have any such control panel, so i have to manually add trust for the location of my .net source code.  that’s done using caspol.exe, found in %windir%\Micrsoft.NET\Framework\v2.0.50727\.  it’s a command-line utility, which on windows means it’s difficult to find out how to use it.  i managed to get this sort of command to work:

%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1.2 -url file:///X:\path\to\source\* FullTrust

the 1.2 makes perfect sense, wouldn’t you agree?

please note that the above post is likely made up in its entirety.

misterhaan
radar
subject:  re: trusting .net projects from a network location
posted:  11:19:07 am, apr 30, 2010

note this also works with visual studio 2010.  on windows vista or windows 7 be sure to run the command as administrator (click start button, type in cmd, right-click cmd.exe that shows up in the list and choose run as administrator).  i still used the v2.0 directory’s caspol.exe even on 64-bit windows 7 running visual studio 2010 and it works fine.  64-bit windows gets you a Framework64 directory right next to the Framework directory, and there are other version directories available (1.0, 1.1, 2.0, 3.0, 3.5, and 4.0 if you have visual studio 2010 installed) — as far as i know there’s only one security policy for the system so it shouldn’t matter if you use caspol from Framework64\v4.0.30319 instead.  i ran the command twice:  once with the mapped drive (X:\path) and then again with the unc path (\\server\share\path) — not sure if that's needed but seems better to have both.

please note that the above post is likely made up in its entirety.

add a reply

posting asanonymous (log in or register)

nearby pages

users online

17 guests

user list

statistics

hits today986
registered users184
forum posts419
comments157

powered by

  • dreamhost
  • linux
  • apache
  • php
  • mysql