[Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
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@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
On 03.11.2011 13:51, H . 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. See https://help.ubuntu.com/community/EnvironmentVariables#System-wide_environment_variables Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
Hi Robert, thanks for your hints. The link sent describes how environment variables can be set up in Ubuntu. Of course, nobody would try to manually set up environment variables when trying to configure proxies. This is done by using SystemSettingsNetwork Proxy. After that, Ubuntu sets up the necessary environment variables. In case of the no_proxy environment variable this can be tested by issuing echo $no_proxy on the command line. My question is not about setting up environment variables. I need to retrieve the content of $no_proxy via C# in an ASP.NET app. To: mono-devel-list@lists.ximian.com From: robe...@gmx.net Date: Thu, 3 Nov 2011 13:58:50 +0100 Subject: Re: [Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app On 03.11.2011 13:51, H . 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. See https://help.ubuntu.com/community/EnvironmentVariables#System-wide_environment_variables Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
On Nov 3, 2011, at 9:12 AM, H . wrote: Hi Robert, thanks for your hints. The link sent describes how environment variables can be set up in Ubuntu. Of course, nobody would try to manually set up environment variables when trying to configure proxies. This is done by using SystemSettingsNetwork Proxy. After that, Ubuntu sets up the necessary environment variables. In case of the no_proxy environment variable this can be tested by issuing echo $no_proxy on the command line. My question is not about setting up environment variables. I need to retrieve the content of $no_proxy via C# in an ASP.NET app. In all likelihood, the ASP.NET user (probably www-data, the Apache/Nginx/Lighttpd user) doesn't even have NO_PROXY set in its environment, since it doesn't make sense to set it. If you want NO_PROXY to propagate to the web server's environment, you'll have to edit its startup scripts to do so. Hope that helps. —Bojan ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
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 . test051...@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@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Environment.GetEnvironmentVariable() not working in Linux ASP.NET app
On 03.11.2011 14:12, H . wrote: Hi Robert, thanks for your hints. The link sent describes how environment variables can be set up in Ubuntu. Of course, nobody would try to manually set up environment variables when trying to configure proxies. This is done by using SystemSettingsNetwork Proxy. After that, Ubuntu sets up the necessary environment variables. In case of the no_proxy environment variable this can be tested by issuing echo $no_proxy on the command line. Yes, you may see it on *your* own command line, as a normal user, but the web server (you didn't specify which one, so we can't help) may have its own environment default settings. A common way to solve that (if Ubuntu's config tools don't provide a facility to set either global or web server specific vars) is to set this env var globally and manually. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] WCF Deserialization Problem
I have found the problem about the security exception. At my working folder on the project Npsql.dll and MonoSecuriy.dll wass standing. We need the Npsql.dll but not the MonoSecuriy.dll and it is added automatically by compiler I guess. When I deleted the MonoSecuriy.dll my problem solved. I found the idea from the stackoverflow question below. http://stackoverflow.com/questions/6138738/troubleshoot-soaphttpclientprotocol-connection-problem Best regards... -- View this message in context: http://mono.1490590.n4.nabble.com/WCF-Deserialization-Problem-tp3937166p3986219.html Sent from the Mono - Dev mailing list archive at Nabble.com. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list