How to show Windows Credentials Prompt

How to show Windows Credentials Prompt

Secure Home | Search | About

Microsoft Applications Security - Microsoft's general security discussions and announcements 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
How to show Windows Credentials Prompt pascal 07-11-2008
Posted by pascal on July 11, 2008, 10:46 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Simple question, already searched but really nothing found.

When I try to access a network resource - of a server I not yet have
authenticated against - I get a Windows Credentials Prompt.

I'm developing an .net application that needs to access a network
share. Is there a .net or WinAPI call I can make that shows this
Windows Credentials Prompt and gives me back a token so that I can
Impersonate that User to access the network resource? Without this i
get security exceptions and can not access files.

Impersonation by using a Token through calling LogonUser API (with
user password given) works. But i would prefer showing the Windows
Prompt instead of doing a own user/pass prompt.

And, is there an API to check if a token exists to access a server?
(checking if it is necessary to show the prompt.)

thanks a lot!

Posted by Alun Jones on July 20, 2008, 2:24 am
If you were  Registered and logged in, you could reply and use other advanced thread options
> Simple question, already searched but really nothing found.
>
> When I try to access a network resource - of a server I not yet have
> authenticated against - I get a Windows Credentials Prompt.
>
> I'm developing an .net application that needs to access a network
> share. Is there a .net or WinAPI call I can make that shows this
> Windows Credentials Prompt and gives me back a token so that I can
> Impersonate that User to access the network resource? Without this i
> get security exceptions and can not access files.
>
> Impersonation by using a Token through calling LogonUser API (with
> user password given) works. But i would prefer showing the Windows
> Prompt instead of doing a own user/pass prompt.
>
> And, is there an API to check if a token exists to access a server?
> (checking if it is necessary to show the prompt.)

CredUIPromptForWindowsCredentials should do the trick of getting you a
username and password back - I don't see a function that just returns a
token.

Alun.
~~~~
--
Texas Imperial Software | Web: http://www.wftpd.com/
23921 57th Ave SE | Blog: http://msmvps.com/alunj/
Woodinville WA 98072-8661 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(425)807-1787 | Try our NEW client software, WFTPD Explorer.




Similar ThreadsPosted
Re: (CORRECTION): How Does One Show ".$#!" Extension For "Cryptext" Under Windows XP Pro? March 2, 2006, 1:54 pm
Windows Integrated Authentication vs IE session credentials December 18, 2006, 5:11 pm
No credentials being passed across network with Windows Authentica August 8, 2007, 11:22 am
Can we default to a trusted domain in IIS prompt? December 27, 2005, 1:11 pm
Attacks prompt third parties to fix flaw October 3, 2006, 1:02 am
Assign IPSec Policy via cmd prompt November 28, 2007, 5:58 am
Zone Alarm Via Command Prompt ? August 8, 2008, 9:38 am
Safe mode with command prompt, networking December 31, 2005, 7:39 pm
These posts don't show on MS server either. Why? August 6, 2009, 4:15 am
Some Files dont show the security tab April 16, 2008, 11:41 am

The site map in XML format XML site map

Contact Us | Privacy Policy