Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Mon, 28 Apr 2008 07:11:03 -0700,    group: microsoft.public.platformsdk.security        back       


Programmatic Access to LogOn Dialog   
Hi,

My question is about programmatic use of Windows authentication. Is there a 
way to prompt the user for his/her password (and optionally a user name) and 
return a simple authentication pass/fail result (plus user name if 
applicable) to the caller?

To elaborate: I'm developing a Windows application that needs to do two 
things: (a) confirm the identity of the current user at various stages to 
provide a chain of custody; (b) confirm the identity of a user other than the 
current one, for example when a supervisor wishes to access restricted 
functionality.

Clearly, I could do this by implementing my own password system but I'd like 
to use Windows authentication if possible as this would be both more elegant 
and more secure. The application is a client-server system written in VB 
under VS 2005 using SQL Server 2005 as the back end. All machines/accounts 
are part of the same domain and all users of the system have Windows domain 
accounts.

Any suggestions would be appreciated. Thank you in anticipation.
date: Mon, 28 Apr 2008 07:11:03 -0700   author:   Gholson

RE: Programmatic Access to LogOn Dialog   
I've now found article 841699 which provides the information I need, 
including an example. I'm therefore posting this reply as a signpost for 
anyone looking for the same solution.

If anyone out there knows of a way to accomplish the same thing without 
having to handle user passwords at all (ie, letting the OS display its own 
dialog) I'd still be interested in hearing from them.
date: Mon, 28 Apr 2008 08:13:00 -0700   author:   Gholson

Re: Programmatic Access to LogOn Dialog   
On Apr 28, 7:11 am, Gholson  wrote:
> Hi,
>
> My question is about programmatic use of Windows authentication. Is there a
> way to prompt the user for his/her password (and optionally a user name) and
> return a simple authentication pass/fail result (plus user name if
> applicable) to the caller?
>
> To elaborate: I'm developing a Windows application that needs to do two
> things: (a) confirm the identity of the current user at various stages to
> provide a chain of custody; (b) confirm the identity of a user other than the
> current one, for example when a supervisor wishes to access restricted
> functionality.
>
> Clearly, I could do this by implementing my own password system but I'd like
> to use Windows authentication if possible as this would be both more elegant
> and more secure. The application is a client-server system written in VB
> under VS 2005 using SQL Server 2005 as the back end. All machines/accounts> are part of the same domain and all users of the system have Windows domain
> accounts.
>
> Any suggestions would be appreciated. Thank you in anticipation.



Hi,

You can use the following APIs to create and display
a configurable dialog box that accepts credentials
information from a user:

	CredUIPromptForCredentials()

	CredUIPromptForWindowsCredentials()

http://msdn2.microsoft.com/en-us/library/aa375177(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa375178(VS.85).aspx

Kellie.
date: Mon, 28 Apr 2008 18:32:41 -0700 (PDT)   author:   Kellie Fitton

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us