Bug 33266 - Unable to activate behind a proxy with NTLM
Summary: Unable to activate behind a proxy with NTLM
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Activation ()
Version: 5.9
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Martin Baulig
Depends on:
Reported: 2015-08-20 13:17 UTC by John Miller [MSFT]
Modified: 2017-03-24 20:08 UTC (History)
3 users (show)

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

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:

Description John Miller [MSFT] 2015-08-20 13:17:01 UTC

   A customer using XS behind a proxy that uses NTLM is unable to activate. 

**Steps to Reproduce:**

   1. Need a proxy that uses NTLM authentication
   2. Use XS and try to log into your account through the IDE

**Actual Results:**

   Unable to activate / use XS because it constantly prompts you for activation. 

**Expected Results:**

   Successful login and activation. The customer is able to browse the web normally and other sites prompt for credentials when required, except xamarin.com seems to not work either. 

**Build Date & Platform:**

   XS 5.9.4

**Additional Information:**

   Attached are the IDE logs and a PCAP network capture by the customer.
   This is "McAfee Web Gateway" proxy. 
   It's possible that we are only expecting a response of 407, where some proxies return a 401.
Comment 5 Mikayla Hutchinson [MSFT] 2015-10-22 14:27:41 UTC
Here's the error from the logs:

System.Net.WebException: Error getting response stream (ReadHeaders): ServerProtocolViolation ---> System.Exception:    at System.Net.WebConnection.HandleError(WebExceptionStatus st, System.Exception e, System.String where)
   at System.Net.WebConnection.ReadHeaders(System.IO.Stream stream, System.Byte[] ByRef retBuffer, Int32 ByRef status)
   at System.Net.WebConnection.CreateTunnel(System.Net.HttpWebRequest request, System.Uri connectUri, System.IO.Stream stream, System.Byte[] ByRef buffer)
   at System.Net.WebConnection.CreateStream(System.Net.HttpWebRequest request)
   at System.Net.WebConnection.InitConnection(System.Object state)
   at System.Net.WebConnection.<WebConnection>m__0(System.Object state)
  at System.Net.WebConnection.HandleError (WebExceptionStatus st, System.Exception e, System.String where) [0x0003a] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.3/mcs/class/System/System.Net/WebConnection.cs:493 
  --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00045] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.3/mcs/class/System/System.Net/HttpWebRequest.cs:820 
  at System.Net.HttpWebRequest.GetRequestStream () [0x00057] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.3/mcs/class/System/System.Net/HttpWebRequest.cs:836 
  at Xamarin.Components.Ide.SSO.Client+<DoRequest>c__AnonStorey0.<>m__1 (System.Net.HttpWebRequest req) [0x0002d] in /Users/builder/data/lanes/1980/b99cb19a/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/SSO/Client.cs:71 
  at MonoDevelop.Core.Web.RequestHelper.GetResponse (CancellationToken token) [0x0008c] in /Users/builder/data/lanes/1980/b99cb19a/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs:93
Comment 6 Greg Munn 2015-10-22 15:17:43 UTC
Martin, can you take a look at this from a mono perspective please.
Comment 7 Monte 2015-10-22 16:52:53 UTC
I believe I am the reporter of this ticket. In addition to installation failing, I also cannot login to Xamarin Online from XS with the same symptoms.

Our proxy is McAfee Web Gateway.
Comment 8 Martin Baulig 2016-11-11 10:07:54 UTC
Do you still have this problem?
Comment 9 Greg Munn 2017-03-24 20:08:03 UTC
Closing. if this is still an issue, please reopen the bug. Also, it's likely that this will become a non, or at the least a different, issue now that we use Microsoft identity to log in and Xamarin activation is no longer going to be supported.