Article ID: 195567 - Last Review: January 23, 2007 - Revision: 3.3

Wininet Credentials Are Not Reset on Keep-Alive Connections

This article was previously published under Q195567
Expand all | Collapse all

SYMPTOMS

The Wininet InternetSetOption API call can be used to modify the credentials used for a HTTP request. However, if a previous successfully authenticated keep-alive connection has already been made with the server, Wininet continues to use the old credentials.

RESOLUTION

To resolve this problem, obtain and install Internet Explorer 4.01 Service Pack 2. You can obtain Internet Explorer 4.01 Service Pack 2 from the following Microsoft Web site:

http://www.microsoft.com/windows/ie/downloads/default.mspx (http://www.microsoft.com/windows/ie/downloads/default.mspx)

STATUS

Microsoft has confirmed this to be a problem in the products listed at the beginning of this article.

MORE INFORMATION

The following example demonstrates the problem described in this article:

  1. Successful request using User, Password credentials: hOpen = InternetOpen(...) hConnect = InternetConnect ( hOpen,"Server", ..., User , password , INTERNET_SERVICE_HTTP,...) hReq = HttpOpenRequest (hConnect, "GET", Url , ...) HttpSendRequest (hReq, ...) InternetReadFile(hReq, ...)
  2. Modify the credentials using: InternetSetOption (..., INTERNET_OPTION_USERNAME , User2...) InternetSetOption (..., - INTERNET_OPTION_PASSWORD, Password2,...)
  3. The new request still uses User, Password credentials: hReq = HttpOpenRequest (hConnect, "GET", Url , ...) HttpSendRequest (hReq, ...) InternetReadFile(hReq, ...)
The fix detects if the credentials have been changed on a new request.

APPLIES TO
  • Microsoft Internet Explorer 4.01 Service Pack 1
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Windows 98 Standard Edition
Keywords: 
kbhotfixserver kbqfe kbnetwork kbprb KB195567
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations