Groups | Blog | Home
all groups > dotnet framework > october 2007 >

dotnet framework : Administrator Credential Check



Sid Price
10/31/2007 4:20:25 PM
My client is asking that when their application is run by a regular user an
administrator level user be able to enter their credentials to enable
certain advanced features. The application does not need to run with the
admin's credentials, we just want to validate that the user asking for the
advanced features has the admin credentials and enable the advanced features
until the application is closed or the advanced features are turned off.
Is this possible?
If so in general how can it be achieved from a managed application (VB.NET)?
Sid.

Henning Krause [MVP - Exchange]
11/1/2007 12:34:10 PM
Hi Sid,

If the computer is part of a domain or you want to check against a local
administrator account, use the LogonUser method.

See http://www.pinvoke.net/default.aspx/advapi32/LogonUser.html.

Kind regards,
Henning Krause



[quoted text, click to view]
Sid Price
11/1/2007 2:16:35 PM
Thank you for the pointer Henning, the suggestion works very well,
Sid.

"Henning Krause [MVP - Exchange]" <newsgroups_remove@this.infinitec.de>
[quoted text, click to view]

AddThis Social Bookmark Button