I have a line in some legacy code:
Dim cmdLineArgs() As String = System.Environment.GetCommandLineArgs()
Earlier, I had been getting this error:
“Request for the permission of type System.Security.Permissions.EnviormentPermission, mscorlib, Version=1.05000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.”
I had to resort to messageboxes (couldn't add simple file logging at this point). So, now, the messagebox shows before the GetCommandLineArgs, but the messagebox after that line never shows up. Very weird.
By the way, this works on three out of four logons, so I suspect some kind of permissions problem, but don't know what it is.