Accessing credentials cached by wininet from .NET Framework
From: Marcus F (anonymous_at_discussions.microsoft.com)
Date: 03/16/04
- Next message: Hernan de Lahitte: "Re: Usercontrols and impersonate user"
- Previous message: Rugha: "Calling DPAPI (User Store) from ASP.NET return "Access is Denied" Exception, hex=80070005"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 16 Mar 2004 08:36:09 -0800
Hi
As I understand it, if I visit a web page in IE that requires authentication, wininet.dll calls InternetErrorDlg (ERROR_INTERNET_INCORRECT_PASSWORD) which prompts the user for their username and password. Once the correct credentials have been supplied, these are then cached by wininet.dll and will be tried when accessing secured resources within that site, regardless of which instance of IE makes the call, until the last instance of IE has been unloaded and the memory released.
I am calling system.Web.HttpRequest in the .NET Framework, to access a resource that I have already authenticated to within IE. I can only connect to it if I explicitly specify credentials:
request.Credentials = New NetworkCredential("username", "password")
How can I access and reuse the credentials that the user supplied, that are already cached by wininet.dll rather than the user having to be prompted for the same set of credentials twice?
Thanks in advance!
- Next message: Hernan de Lahitte: "Re: Usercontrols and impersonate user"
- Previous message: Rugha: "Calling DPAPI (User Store) from ASP.NET return "Access is Denied" Exception, hex=80070005"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|