[Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
Robert Jordan
robertj at gmx.net
Wed Nov 9 09:17:36 EST 2011
On 09.11.2011 13:51, H . wrote:
>
> Hi Robert,
>
> I have now debugged the issue using Ubuntu Maverick/ 32 bit. I did the following:
>
> (1) Configure system proxy settings and reboot machine
> (2) In terminal "echo $http_proxy" returns "http://http.proxy:8080/"; "echo $no_proxy" returns "localhost,127.0.0.0/8,*.local"
> (3) Created an ASP.NET project in MonoDevelop and entered the following code in Default.aspx.cs
> protected void Page_Load(object Sender, EventArgs e)
> {
> string str1=Environment.GetEnvironmentVariable("http_proxy");
> string str2=Environment.GetEnvironmentVariable("no_proxy");
>
> string strBreak="stop";//put breakpoint at this line
> }
> (4) After pressing F5, we can see that str1 contains it's expected value while str2 is null
One more eventuality: Maybe MonoDevelop is resetting the environment
while invoking XSP in debug mode.
You can check this by manually invoking XSP from a terminal where you
know that this env var is set.
Robert
More information about the Mono-devel-list
mailing list