Groups | Blog | Home
all groups > dotnet security > july 2004 >

dotnet security : How do I automate "fully trusting an assembly" through a batch file?



John Dean
7/9/2004 5:22:09 PM
Which is the command line tool that can accomplish this:

1) Run ".NET Configuration 1.1" from Administrative Tools
2) Runtime Security Policy > Increase Assembly Trust
3) Make changes to this Computer
4) App path: \\SERVER\Path\MyApp.exe
5) set "Full Trust" for MyApp.exe



Nicole Calinoiu
7/10/2004 7:45:07 AM
John,

Caspol.exe can be used to configure the security policy. See
http://msdn.microsoft.com/library/en-us/cptools/html/cpgrfCodeAccessSecurityPolicyUtilityCaspolexe.asp
for details.

HTH,
NIcole


[quoted text, click to view]

John Dean
7/10/2004 12:08:45 PM
Hi Nicole,
Do you know the exact command line to accomplish "fully trusting" an
assembly that is on a network share? Thanks!


[quoted text, click to view]

Stephen Gennard
7/15/2004 11:19:12 AM
This may help you... it has helped me...

To give everything access on Y:\ full permissions
caspol -addgroup 1 -url file://Y:/* FullTrust

To give hello.exe full trust on Y:\ full
caspol -addgroup 1 -url file://Y:/hello.exe FullTrust

Or if hello.exe is signed...
caspol -addgroup 1 -strong -file hello.exe hello 0.0.0.0 FullTrust
(change 0.0.0.0 with your version number...)

--
Stephen

[quoted text, click to view]

AddThis Social Bookmark Button