B
Bari Allen
On the first line of sub Main() in my console application, I check for the
correct number of command line arguments, as follows:
If Environment.GetCommandLineArgs.Length < 3 Or
Environment.GetCommandLineArgs.Length > 4 Then
When I run the .exe file from the machine it's sitting on (and I've tried
copying it to several drives & running it locally from them) it works, fine,
using the following syntax:
myprogram.exe /switch 7/30/04
-or-
c:\myprogram.exe /switch 7/30/04
However, if I copy it to a server, and try to call it using a UNC, as
follows:
\\mypath\myprogram.exe /switch 7/30/04
I get the following error message, highlighting that first line in Sub
Main(), shown above:
An unhandled exception of type
'System.Security.SecurityException'
occured in mscorlib.dll
Additional information: Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
failed.
Ultimately, I would like to attach this app to a sql job, but I don't want
to have to keep it on the server. Thanks in advance for any help you can
offer on this.
Bari
correct number of command line arguments, as follows:
If Environment.GetCommandLineArgs.Length < 3 Or
Environment.GetCommandLineArgs.Length > 4 Then
When I run the .exe file from the machine it's sitting on (and I've tried
copying it to several drives & running it locally from them) it works, fine,
using the following syntax:
myprogram.exe /switch 7/30/04
-or-
c:\myprogram.exe /switch 7/30/04
However, if I copy it to a server, and try to call it using a UNC, as
follows:
\\mypath\myprogram.exe /switch 7/30/04
I get the following error message, highlighting that first line in Sub
Main(), shown above:
An unhandled exception of type
'System.Security.SecurityException'
occured in mscorlib.dll
Additional information: Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
failed.
Ultimately, I would like to attach this app to a sql job, but I don't want
to have to keep it on the server. Thanks in advance for any help you can
offer on this.
Bari