GivenRandy
asked on
GetCommandLineArgs -- Permissions Problem ?
I have a line in some legacy code:
Dim cmdLineArgs() As String = System.Environment.GetComm andLineArg s()
Earlier, I had been getting this error:
“Request for the permission of type System.Security.Permission s.Enviorme ntPermissi on, mscorlib, Version=1.05000.0, Culture=neutral, PublicKeyToken=b77a5c56193 4e089 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.
Dim cmdLineArgs() As String = System.Environment.GetComm
Earlier, I had been getting this error:
“Request for the permission of type System.Security.Permission
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.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Intranet application? Is the assembly strong-named? Do you have any trust set for the application through CASPOL? Did you set the Intranet to Full Trust through the configuration wizard?
Bob
Bob
ASKER
Oh, geez, it was way simpler than I thought. I had forgotten to compile with Release instead. LOL
See ya :D
ASKER