Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Application performs slowly when using HttpOpenRequest function or Windows.Web.Http.HttpClient class to send HTTPS requests


View products that this article applies to.

Symptoms

Assume that you develop a Windows Store app that uses the Windows.Web.Http.HttpClient class to send HTTPS requests to a web server. When you capture a network trace of the traffic exchanged between the app and the server, you notice that each call to the Windows.Web.Http.HttpClient.GetStringAsync method or other similar methods of the Windows.Web.Http.HttpClient class opens new connections to the web server. This behavior adversely affects the app performance.

Note The Windows.Web.Http.HttpClient class uses the Windows Internet (WinINet) API to send HTTPS requests. This issue also occurs when you develop a Windows desktop application that uses the WinINet API directly and you provide the INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS flag to the HttpOpenRequest function.

↑ Back to the top


Resolution

Update information

Internet Explorer also uses the WinINet API. To resolve this issue, install the most recent cumulative security update for Internet Explorer. To do this, go to Microsoft Update.

For technical information about the most recent cumulative security update for Internet Explorer, go to the following Microsoft website:Note This update was first included in security update 2969262.

For more information about security update 2969262, click the following article number to view the article in the Microsoft Knowledge Base:
2969262 MS14-035: Cumulative security update for Internet Explorer: June 10, 2014

↑ Back to the top


Workaround

Use the System.Net.Http.HttpClient class

If you develop a Windows Store app, you can work around this issue by not using the Windows.Web.Http.HttpClient class. Instead, you can use the System.Net.Http.HttpClient class, because it has its own HTTP protocol implementation. 

Do not use the INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS flag 

If you develop a Windows desktop application that uses the WinINet API, you can work around this issue by not using the INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS flag to the HttpOpenRequest function.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

For more information about the Windows.Web.Http.HttpClient class, go to the following Microsoft website:For sample code about the Windows.Web.Http.HttpClient class, go to the following Microsoft website:For more information about the HttpOpenRequest function, go to the following Microsoft website:For more information about the System.Net.Http.HttpClient class, go to the following Microsoft website:
See the terminology that Microsoft uses to describe software updates.

↑ Back to the top


Keywords: kbqfe, kbfix, kbsurveynew, kbexpertiseadvanced, kb

↑ Back to the top

Article Info
Article ID : 2965686
Revision : 1
Created on : 1/7/2017
Published on : 6/10/2014
Exists online : False
Views : 212