0

We have an application that communicates with azure (ServiceBus, Queue and Blobs) and some third party WebServices that requires HTTPS.

The problem is that some of our clients use proxy servers with rules to block connections based on the user-agent header and, as we discovered, .NET does not send the user-agent during the HTTPS CONNECT. For Azure we can choose not to use HTTPS and go with HTTP (I don’t like it but it is a possibility). The problem is that we need to access a Web Service through HTTPS. We do not have control over this Web Service and the HTTPS is mandatory.

I’ve search for solutions and found several people with the same problem but no solution other than avoid HTTPS and use HTTP. Does anyone knows a solution for this? Is it possible to replace “default” .NET HTTPS connections with some other library (like libcurl.NET) and use this library as the default in our application?

Thanks.

nflash
  • 430
  • 3
  • 16
  • What class are you using to make the HTTPS connection? If you're using HttpWebClient, you can set the User Agent yourself: http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.useragent.aspx – Ryan M Jul 29 '13 at 15:04
  • Or are you saying that this property is ignored when the scheme is HTTPS? – Ryan M Jul 29 '13 at 15:11
  • The property is ignored during the HTTPS Connect. As I read somewhere the header is sent in the requests sent after the connection is established but not during the CONNECT. – nflash Jul 29 '13 at 15:14
  • According to this: http://stackoverflow.com/questions/2396554/send-user-agent-through-connect-and-post-with-winhttp?rq=1 This problem is related to WinHTTP and is a "behavioral change" introduced in Windows 7. – nflash Jul 29 '13 at 15:19

0 Answers0