Running .NET apps from shared folders

A

Adam

Hi,

I am writing a basic pc audit script, which needs to be run from the
netlogon share. The script runs wmi queries, and it fails to run properly
from the network share, but runs fine locally. Below is the error I am
getting. As this script will be run on 300+ different domains, having them
make changes to their group policy or running the capsol tool, isn't really
an option. Does anyone have any suggestions?

Unhandled Exception: System.Security.SecurityException: That assembly does
not allow partially trusted callers.

at
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rhm,
SecurityAction action, Object demand, IPermission permThatFailed)

at QuickTest.Module1.GetCSData()

at QuickTest.Modile1.Main()

The action that failed was:

LinkDemand

The assembly or AppDomain that failed was:

QuickTest, Version=1.0.0.0,Culture=neutral, PublicKeyToken=null

The Zone of the assembly that failed was:

Intranet

The Url of the assembly that failed was:



Thanks in advance.



Adam
 
G

Gregory A. Beamer

Adam said:
Hi,

I am writing a basic pc audit script, which needs to be run from the
netlogon share. The script runs wmi queries, and it fails to run properly
from the network share, but runs fine locally. Below is the error I am
getting. As this script will be run on 300+ different domains, having
them make changes to their group policy or running the capsol tool, isn't
really an option. Does anyone have any suggestions?

Some suggestions? Yes. Will they be guaranteed to work? No.

Something you are doing is hitting the system. Since you say PC audit, that
makes sense. You can adorn the code with the attribute
[AllowPartiallyTrustedCallers], but I am not sure that will solve everything
(in fact, I think it won't on the file system through a share). As we move
into .NET 4.0 land, the security model changes a bit, which may give you
some additional options.

Changes at the system level would work, but I see the issue with the number
of domains. I wish I had an easy answer and hope someone has something for
you, but I am tapped out at this time.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top