From: Adam on 10 Mar 2010 22:46 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
From: Gregory A. Beamer on 11 Mar 2010 08:53 "Adam" <web(a)officexpress.com> wrote in message news:4b9867b1$0$27871$c3e8da3(a)news.astraweb.com... > 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! | ************************************************
|
Pages: 1 Prev: Get size of file on ftp server before downloading Next: Directory recursion |