Command line/EnvironmentPermissions

A

Al Kaufman

I have a simple console app that uses Environment.GetCommandLineArgs to grab
arguments in the command line. It works great on my machine. When I try to
access the application from another machine, it fails due to security
issues. Specifically I get an error message regarding
System.Security.Permissions.EnvironmentPermissions. Apparently I don't have
permission to access the command line arguments on the remote PC.

How can this be handled?

Thanks,

Al
 
M

Mattias Sjögren

Al,
How can this be handled?

If this is in an EXE file, get the command line parameters passed to
your Main method instead

Sub Main(ByVal CmdArgs() As String)



Mattias
 
P

Peter Huang

Hi,

Thanks for posting in the community.

Did Mattias's suggestion help you?
If you need further assistance on this issue, please post here, I will work
on it with you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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