Bug 2119 - Debugging WebClient's new proxy support does not work
Summary: Debugging WebClient's new proxy support does not work
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: unspecified
Hardware: Other Linux
: Low normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2011-11-21 07:27 UTC by QuickJack
Modified: 2016-12-01 15:25 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Test Case (9.41 KB, application/zip)
2011-11-25 08:00 UTC, QuickJack

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 2119 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description QuickJack 2011-11-21 07:27:52 UTC
WebClient class in mono/master implements new support for web proxies. The Linux implementation is based on the environment variables http_proxy and no_proxy.

When starting an ASP.NET debug session in MonoDevelop, the no_proxy variable is always null. However, the http_proxy variable is available as expected. The problem does not occur in standard C# applications.

To work around this problem, it is possible to run xsp2 from the command line.

The issue has been discussed here: http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg27157.html
Comment 1 QuickJack 2011-11-25 08:00:26 UTC
Created attachment 947 [details]
Test Case

This is an example ASP.NET project which demonstrates the behaviour. It contains two TextBoxes. One for displaying http_proxy and one for no_proxy.

(1) Second Text box remains empty when the project is run from within MonoDevelop by pressing F5 => BUG
(2) If you cd to the project directory and enter xsp2 in Terminal, the second TextBox displays the no_proxy variable as expected.
Comment 2 Jeffrey Stedfast 2011-12-12 18:35:21 UTC
MonoDevelop simply starts xsp with the system environment variables, so if the spawned xsp's environment does not contain no_proxy, then it suggests that MonoDevelop's environment doesn't contain no_proxy either.

If you are starting MonoDevelop from a GUI menu, then it might not be picking up environment variables that you have set in you ~/.bash_profile
Comment 3 QuickJack 2011-12-13 04:28:13 UTC
As you can see from the discussion (external link) the proxy settings have been applied system wide (Ubuntu System). I would never set up proxies by editing config files manually. I have done the following test:

"sudo -u www-data echo $no_proxy" which also lists the content of no_proxy for the very restricted user www-data.

I still don't understand, why this variable is hidden from ModoDevelop's spawned xsp2/mono process.
Comment 4 Jeffrey Stedfast 2011-12-13 11:03:28 UTC
What variables are in MonoDevelop's environment? That's what matters.

The xsp process will share MonoDevelop's environment variables.
Comment 5 PJ 2013-11-19 17:04:02 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 6 QuickJack 2013-11-22 03:56:39 UTC
I did extensive changes to enable proxy support in Mono. However, it was not possible for me to debug an app using proxy support with MonoDevelop under Ubuntu. As far as I can remember it was due to the fact that the system's http_proxy environment variable was not visible to MonoDevelop.

To reproduce this problem one should create an app that uses WebClient with proxy support. This app might fail when beeing executed with the MonoDevelop debugger. But it should run perfectly as a separate app.

I suggest that someone familar with MonoDevelop's inernals should check the issue.
Comment 7 Lluis Sanchez 2016-12-01 15:25:53 UTC