[Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app

Rafael Teixeira monoman at gmail.com
Thu Nov 3 09:38:49 EDT 2011


Remember that Environment Variables are set per-process and inherited by
copying by child processes, so are you sure they were set before the web
server hosting your asp.net was started? If you change afterwards it won't
propagate to the service/daemon process...


Rafael "Monoman" Teixeira
---------------------------------------
"The most exciting phrase to hear in science, the one that heralds new
discoveries, is not 'Eureka!' (I found it!) but 'That's funny ...'"
Isaac Asimov
US science fiction novelist & scholar (1920 - 1992)


On Thu, Nov 3, 2011 at 10:51 AM, H . <test051102 at hotmail.com> wrote:

>  Environment.GetEnvironmentVariable("no_proxy") not working in Linux
> ASP.NET app
>
> After configuring proxies in Ubuntu, the environment variable no_proxy
> contains the list of proxies to bypass. Using
> Environment.GetEnvironmentVariable("no_proxy") we can retrieve the content
> of this environment variable as a string. This is working fine in standard
> C# applications.
>
> However, when calling Environment.GetEnvironmentVariable("no_proxy")
> within an ASP.NET application, the return value is always null. As a
> result, the current proxy support in Mono fails to establish the list of
> proxies to bypass.
>
> I am wondering how Environment.GetEnvironmentVariable() is working behind
> the scenes. I guess the reason why it
> fails in ASP.NET is related to some kind of a permission issue.
>
> Does anybody know more about the implementation details of
> Environment.GetEnvironmentVariable() in Mono?
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20111103/ef0e80ee/attachment.html 


More information about the Mono-devel-list mailing list