File Permission

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I have an Console Application (my first endevor in Console
applications) which works fine when I and using Visual Studio to run it on my
workstation. Now I take the application and move it to a "server". I
created a ".bat" file to invoke the application, but now when I run I get a
security violation error when I run it from my workstation (not the server).
SO to be clear, from my workstation, i naviagate the the shared drive on my
server and double click on the ".bat" file and I get the following error....

Message: Request for the permission of type
System.Security.Permissions.FileIOP
ermission, mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c5
61934e089 failed.

If I log onto the server and run the bat file, it runs just fine, but I am
not able do do the same from my workstation.

So what do I need to do to be able to run this in that manner?
 
Jim,

From the batch file, are you calling the executable on a share, or
something of that nature? When you do this, the runtime realizes that the
executable is not from the local machine, and executes it with a diminished
permission set (one of those permissions being file IO). You would have to
go to the .NET administration tool, and give it the appropriate permissions.

Hope this helps.
 
Back
Top