Log on as a different user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

a Windows Forms VB.Net application uses a web service method to determine if
the present Windows user account is a member of the admin or power user group
on the server computer (ASP.NET without impersonification, no anonymous user
allowed for the web site in IIS).

That works OK.

If the user is not in one of these groups the authentication fails (that is
also OK). Now I want to popup a window that enables the user to log on to the
server computer as a different user and authenticate then again (like it is
done be Internet Explorer automatically if the user has no access rights for
a specific ressource).

How can this be done in VB.Net?

Thanks for hints in advance.
 
Hi Henry,

I think you may try to send the new NTLM to the WebService to see if that
works for you.

MyService.MyService ms = new AuthClient.MyService.MyService();
System.Net.NetworkCredential nc = new
System.Net.NetworkCredential("username","password","domainname");
System.Net.CredentialCache cc = new System.Net.CredentialCache();
cc.Add(new Uri(ms.Url),"NTLM",nc);
ms.Credentials = cc;
ms.Execute("dfdsfds");

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top