views:

289

answers:

1

I have restricted access to a site by using Integrated Windows Authentication and turning off anonymous access. This way I can then show them their real name (from looking up on Active Directory and using the server variable LOGON_USER) and do other related Active Directory tasks.

How can I then prompt again for their user credentials, through a 'sign in as other user' link , showing the browser prompt (like you would get on a browser like Chrome or Firefox, or if the site was not in the 'Intranet' zone in IE) rather than a Web Form?

Since SharePoint offers this functionality, I assume there is a way to do this through code, but I don't know what code can do this (using C#). I can send a 401 header which makes the prompt appear, but how do you then confirm if they are logged in?

+1  A: 

Maybe this can help you out.

ASP .NET – C# – How to “Sign in as Different User” like in Microsoft SharePoint with Windows Authentication

Mark
Doesn't seem to work for me. When I login, the LogonUserIdentity is still the same as before. In fact, it does not even authenticate - any username and password entered ends up redirecting back to the home page.
Sam