In order for .NET applications to access remote resources the local .NET
client access security policy must be modified for each UNC
\\server\share that is to be trusted.   This change is performed using
the caspol.exe tool provided with each .NET installation.

caspol.exe must be executed with Administrator privileges.

As an example:

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -pp off
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -m -ag -l -URL
"file://afs/your-file-system.com/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -m -ag -l -URL
"file://afs/ir.stanford.edu/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -pp on

If there are multiple versions of .NET in use, the policy needs to
altered on all of them.

c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe -pp off
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe -m -ag -l -URL
"file://afs/your-file-system.com/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe -m -ag -l -URL
"file://afs/ir.stanford.edu/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe -pp on

and if there are 64-bit versions those also need to be modified:

c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CasPol.exe -pp off
c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CasPol.exe -m -ag -l
-URL "file://afs/your-file-system.com/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CasPol.exe -m -ag -l
-URL "file://afs/ir.stanford.edu/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CasPol.exe -pp on

c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\CasPol.exe -pp off
c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\CasPol.exe -m -ag -l
-URL "file://afs/your-file-system.com/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\CasPol.exe -m -ag -l
-URL "file://afs/ir.stanford.edu/*" FullTrust
c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\CasPol.exe -pp on

I hope this is helpful.

Jeffrey Altman


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to