First of all I did a google research on this but I haven't found a classy/stable solution yet.
I am currently on windows 7. The idea is to use that us all very famous windows authentication dialog and its background logic to let the windows confirm whether you are allowed.
I was hoping there would be something like this:
using(System.Credentials.WindowsAuthDialog dlg = new ...())
{
// idk something like this
if(dlg.Confirm() == Result.OK)
{
var user = dlg.authentificatedUser;
string firstName = user.Firstname
...
}
}
Am I asking for too much? How shall I "correctly" use windows credentials dialog? Please provide me your experiences and examples. Thanks in advance guys
EDIT:
I am asking for that small dialog which pops up when you for example want to run an exe as admin. You have to provide your username and password. After that windows runs its background logic, connects to server or whatever and tells if you are allowed to do so.