[Mono-list] Compiling C# program with Request object
maitredede at gmail.com
Fri Jul 11 10:39:38 EDT 2008
> I had been trying to use: System.Environment.GetEnvironmentVariable, which
> works perfectly on the CLI, but when I run it in the IIS CGI environment I
> Unhandled Exception: System.Security.SecurityException: Request for the
> permission of type 'System.Security.Permissions.EnvironmentPermission,
> mscorlib, Version=188.8.131.52, Culture=neutral,
> So I guess I need to grant it permissions to get the environment variable,
> but I don't have a clue how to do this.
This is about the user the CGI runs...
In most cases, IIS user is IUSR_machine, a kind of equivalent to unix user
Due to security restrictions of the IUSR_machine user, it can't acces to its
environement variables. So you have to search in IIS how you can change the
user it uses for CGI access...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list