Bug 11095 - Proxy Support for Xamarin Studio
Summary: Proxy Support for Xamarin Studio
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Updater ()
Version: 4.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
URL:
: 1823 ()
Depends on:
Blocks:
 
Reported: 2013-03-12 20:57 UTC by Allie Miller
Modified: 2016-03-31 20:39 UTC (History)
14 users (show)

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


Attachments
Xamarin Studio with proxy succes/errors (152.54 KB, image/png)
2014-03-19 10:15 UTC, Bruce Abernethy
Details
Screen shots showing Xamarin Studio prompting for proxy credentials then failing (158.09 KB, image/png)
2014-04-15 12:12 UTC, William Garrison
Details


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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Allie Miller 2013-03-12 20:57:50 UTC
When behind a proxy and attempting to log in to Xamarin Studio with their Xamarin Studio Account, the user is unable to do so. This occurs in both Mac and Windows environments. The error that normally occurs with this issue is "There was an error while logging into your account. Please contact support@xamarin.com" when attempting to activate.
Comment 2 Mikayla Hutchinson [MSFT] 2013-03-13 14:26:17 UTC
What kind of proxy?

Xamarin Studio uses the system proxy so this should work.
Comment 5 boris.buegling 2013-04-17 03:40:19 UTC
I am having a similar problem on the Mac. The proxy is configured in System Preferences using "Automatic Proxy Configuration" using a PAC file.
Comment 6 Mikayla Hutchinson [MSFT] 2013-04-22 17:32:19 UTC
Does the proxy require authentication? If so, what kind of authentication?
Comment 7 boris.buegling 2013-04-23 03:10:20 UTC
No, it doesn't require any authentication.
Comment 8 Jeffrey Stedfast 2013-04-23 14:01:20 UTC
I don't think we support PAC files, at least not on  Mac OS.
Comment 9 Davidesan 2013-06-03 06:01:54 UTC
Neither on Windows..  My company uses a PAC file to configure proxy settings and the application cannot connect to the internet.
There was the same issue with the installer but there you can configure manually the proxy settings.
Is there a workaround in the application ?
Comment 10 Jeffrey Stedfast 2013-06-03 07:33:44 UTC
We'll probably need to add settings to Xamarin Studio for this.

I would have thought it would work on Windows since we simply use Microsoft's .NET runtime. I assumed the reason it didn't work on Mac OS X was because of an incomplete implementation of all of the proxy types in the Mono runtime, but if it's also not working on Windows, I guess it must be that there needs to be some sort of user-interaction to provide the necessary proxy info?
Comment 11 Davidesan 2013-06-03 08:21:17 UTC
The same as in the installer !
Where you can set the proxy address and user/pass/domain.
Comment 14 Pierce Boggan [MSFT] 2013-07-11 16:10:17 UTC
Can confirm another customer is having issues with getting logged into their Xamarin Studio account when working behind a proxy.
Comment 15 MrSmith 2013-11-18 20:10:37 UTC
I understand that you can put in your proxy user/pass/domain at Install Time. However there is a huge problem with this.

Our company forces us to change our password every 6 months. Therefore every 6 months we will have to uninstall and reinstall just so that we can update our proxy information.

Please provide an option to update this on the fly.
Comment 16 Mikayla Hutchinson [MSFT] 2013-11-18 22:03:48 UTC
The proxy information you enter at install time is used only by the installer.

Xamarin Studio 4.2 and later has support for proxy authentication. If it does not  work for you, please let us know:
* Operating system and version
* Xamarin Studio version
* Type of proxy
* Type of proxy authentication
* How the proxy is configured in your system settings
* Whether the proxy works in other apps
Comment 17 Bruce Abernethy 2014-03-12 17:00:00 UTC
Windows 7
4.2 (build 2)
HTTP Proxy
User Authentication
Internet Options -> Connections -> LAN Settings -> Automatic Configuration Script (PAC File)
Proxy Does work with other apps (e.g. Visual Studio, Nuget).

Note I can manually enter the proxy name, userid and password (as was necessary for the Xamarin Installer - which worked). But Xamarin Studio does not work.

Some debug data from Fiddler ...

=-=-=- Request =-=-=-=-=

GET http://software.xamarin.com/Service/Updates?v=2&m=b4d87397-5d09-4cf2-8f49-199b815954d6&u=100a4c090f234d47a151cef62a24df53&pvE55A5A70-C6F6-4845-8A01-89DAA5B6DA43=402000002&pvPlEhBk81kBfey9Va=1&pv600D9C0E-3B74-4C51-B7E6-29A47E9325E4=2012022&pv4776efd4-a061-4c4c-a6bf-50eb08119eb1=1384255951&level=Beta&env=MonoDroidInstalled HTTP/1.1
Host: software.xamarin.com
Proxy-Connection: Keep-Alive

=-=-=- Response =-=-=-

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: NEGOTIATE
Proxy-Authenticate: NTLM
Proxy-Authenticate: BASIC realm="Internet Access"
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Set-Cookie: BCSI-CS-1a146acc89a304f9=2; Path=/
Connection: close
Content-Length: 1418
Proxy-Support: Session-Based-Authentication

<HTML><HEAD>
<TITLE>Access Denied</TITLE>

[...]
Comment 18 Mikayla Hutchinson [MSFT] 2014-03-12 22:15:49 UTC
Ah, it looks like we're not checking for proxy credentials in the updater.

Can you confirm other web functionality - particularly, logging into your Xamarin Account - works?
Comment 19 Bruce Abernethy 2014-03-13 07:05:48 UTC
I can log in to the Xamarin.com/forums site, and the bugzilla site,  just fine in the browser(s).
Comment 20 Mikayla Hutchinson [MSFT] 2014-03-19 03:24:37 UTC
I mean other web functions in the IDE, not in your web browser.

In the IDE you should be able to log into your Xamarin account. That feature does have proxy support, so if it works for you, then our proxy support works, and we just need to retrofit it to other areas. If it doesn't work then that's a more difficult problem to solve.
Comment 21 Bruce Abernethy 2014-03-19 10:13:39 UTC
Interesting. Yes, I can "Login" with my credentials and get my firstname/lastname back in Xamarin Studio - through the proxy.

However the "Xamarin News", "Pre-Built Apps" are empty and the "Xamarin Update" window has "Error retrieving update information."
Comment 22 Bruce Abernethy 2014-03-19 10:15:10 UTC
Created attachment 6355 [details]
Xamarin Studio with proxy succes/errors

This just shows that the login was successful through the proxy, but the other areas having issues with the proxy.
Comment 23 Mikayla Hutchinson [MSFT] 2014-03-22 16:52:06 UTC
Thanks, that confirms that our proxy code works with your proxy!

We specifically prioritized adding proxy support for activation. Now we need to retrofit it to all our other network code.
Comment 24 Mikayla Hutchinson [MSFT] 2014-04-04 19:49:51 UTC
*** Bug 1823 has been marked as a duplicate of this bug. ***
Comment 25 William Garrison 2014-04-15 12:06:33 UTC
I just downloaded Xamarin last week and I cannot connect within Visual Studio or Xamarin Studio.  I created a forum post with all the details:
http://forums.xamarin.com/discussion/15540/visual-studio-activation-error
and here are screen shots showing the login process and the error:
http://cdn.vanillaforums.com/xamarin.vanillaforums.com/FileUpload/df/5fae0abd5ce523a86ad1a52cae339c.png

The corporate proxy is setup similar to how boris.buegling@david-software.de
and Bruce Abernethy listed it.  There is a proxy server, configured to use autodiscovery with with a PAC file.  It should automatically authenticate using my domain credentials.  In my case, when I connect, I get a Windows-style popup asking for credentials in addition to the Xamarin dialog box.  My guess is that it wants my proxy credentials, but I hesitate to enter my domain credentials in since it should use the domain credentials, and since I don't really know where it is sending what I type into that dialog.

Xamarin Studio 4.2.3 on Windows 7 64-bit.

What can I do?
Comment 26 William Garrison 2014-04-15 12:12:29 UTC
Created attachment 6583 [details]
Screen shots showing Xamarin Studio prompting for proxy credentials then failing

This shows how Xamarin studio displays an extra dialog box, that I can only guess is asking for Proxy credentials.  Since I am on a domain, it should not prompt me for those credentials and I hesitate to enter them in and risk them being exposed to an outside network.  So I click cancel, then get a failure.
Comment 27 William Garrison 2014-04-15 12:14:03 UTC
I also want to add that Updates work just fine!  So something must be different between the two.  Whatever proxy settings are used for the update: please use those for the login as well!
Comment 28 Mikayla Hutchinson [MSFT] 2014-04-19 14:37:19 UTC
@bojan: it looks like the proxy auth system is breaking domain-based auth, ideas?
Comment 29 Mikayla Hutchinson [MSFT] 2014-04-30 17:53:41 UTC
I have updated the XS proxy auth system from the original NuGet source and ported a lot of core code to use it, including the updater.

A few things (git http, svn, web services, etc) will be more complex but more bugs will need to be opened for those on a case by cases basis. Closing this for now.