views:

82

answers:

1

in ASP.Net, forms authentication, For Testing purposes, we need to enable our QA users who are currently logged into our app to be able to enter an AD ad username, and get logged in as that user.

I thought that

FormsAuthentication.SignOut(); FormsAuthentication.SetAuthCookie(userName, false);

Would do the trick, but it does not. can anyone point me in the right direction?

A: 

Without testing: this should replace your Cookie, but I dont think, that you Principal is been replaced. Try to reset the Principal.

HttpContext.Current.User = new GenericPrincipal(...);

Just a thought...

Arthur
Haven't messed wtih it yet, got put on the back burner,but I wanted to mark a good answer.
Eric Brown - Cal