Login As different user


It helps in performing action like "login As". different user can loging into system by clicking some link.

Login As different windows domain user




solution

Response.StatusCode = 401;
Context.Response.AddHeader("WWW-Authenticate", "NTLM");
Context.Response.Clear();
Context.Response.End();




We can put above snippet even in httpmodule to ensure popup will appear to user if business authentication faiils.


Related Articles

Impersonation

User who is responsible for running current thread can be impersonated programmatically.

Login code in c#

Code for login form ,user enter username,password this is verified from database and according to that user is logged in or invalid user message is given

More articles: Authentication Impersonation Security Windows application

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: