The overall problem:
-I've got .Net 2.0 code running from a network share
(\\server01\share\vb.netcode.exe we'll assume).
-Windows won't run code from a share unless it's trusted.
-I need to configure the security on the workstation to trust the
server.
Ok, that being said. I can configure the workstation using the
Microsoft .NET Framework 2.0 Configuration Utility *IF* the SDK is
installed on said workstation. This works, and is a solution to my
problem.
The downside is that if I have a machine that does not have the SDK
with said Configuration Utility installed, I don't have an easy way to
remedy this. To overcome this, I've created a batch file that will
work using caspol.exe that is provided with the .NET Framework. The
line of code to run caspol in the script is:
call %windir%\Microsoft.NET\Framework\v2.0.50727\caspol -q -m -ag 1.2
-url %1\* FullTrust -n %1 -d "FullTrust granted to: %1"
where %1 is the server share (eg \\server01\share)
Now, this script works perfectly *IF* the SDK is installed (sigh,
re-run?). I run it on a machine that doesn't have the .NET SDK
installed the .NET code still will not run. I'm kind of at a loss
because I thought that's exactly what the caspol utility was for, to
adjust the permissions? The script runs and caspol says that it was
successful, but the code just doesn't have the security to run (I test
for security permissions before running code).
The code itself is a very simple utility that I don't want to create a
deployment package for since that will be overkill. I'm hoping that
this caspol will provide a fix but I can't seem to get it to work. Any
help would be appreciated, thanks!
-Jesse Albert