I'm trying to run a small program I wrote that enumerates the tasks. It outputs the info to a text file so I it can be read by a vb script (not a great solution, I know, but I'm stuck with it for a variety of reasons).
So, when I run, I get a permissons failure because it's not fully trusted code (run's fine off the local d: drive though).
I tried added a [assembly: AllowPartiallyTrustedCallers] to the assemblyinfo.cs file.
Now I get
Unhandled Exception: System.Security.SecurityException: System.Security.Permissi
at TaskLister.TaskService..ctor(String targetServer, String userName, String accountDomain, String password)
at TaskLister.TaskService..ctor(String targetServer)
at TaskLister.Program.Main(String args)
The type of the first permission that failed was:
The demand was for:
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Ve
rsion=188.8.131.52, Culture=neutral, PublicKeyToken=b77a5c561934e089"
which leads me to believe I need to put
in lots of places. Argh.
Am I missing something, or is there an easier way?
P.S. - I'm trying to run from a network share so my scripts are visible from multiple servers. I realize I could just copy the exe/library to the local disk, but I'd like to avoid that.
Oct 14, 2008 at 11:44 PM
Try the release posted today. It may provide a fix, though I haven't tested it. Let me know.