How to show Windows Credentials Prompt

How to show Windows Credentials Prompt

Secure Home | Search | About
 Microsoft Applications Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
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
Some Files dont show the security tab April 16, 2008, 11:41 am
Command to show which User logged onto Machine September 1, 2005, 12:01 pm
Multiple firewalls show in security center May 5, 2006, 9:08 am
Access to "Show processes from all users" in task manager October 27, 2005, 3:09 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

The site map in XML format XML site map

Contact Us | Privacy Policy