I have two websites, let's say SiteA and SiteB. SiteA is using form authentication and SiteB is using Windows authentication. the user's name and password stored in siteA is same as the one in Active Directory. Sometimes, the user need to be navigated
to SiteB from SiteA. So the user who has login on SiteA would have to type in their username and password in AD( which excatly the same one with they used for SiteA ) again to access SiteB.
So my question is : I can put the username and password(after encrypted) in the url to access SiteB when the navigation happened, is there any way we can complete the windows authentication in code so the user don't have to type their username and password
again?
that is a great post, but it is talking about the form authentication all the time. But I am working on two sites under different authentication mode, one is form authentication and the other one is windows authentication.
thanks for your reply. Both posts are talking about how to check the user with AD. But my question is after I can make sure the user's identity with AD, how can I tell the HttpContext.Current about this principal and let the ASP.NET know that this is a
authenticated user, so the browser won't ask user to input their username and password.
ramondlee
Member
1 Points
8 Posts
how to do the windows authentication automatically
Dec 28, 2012 08:30 AM|LINK
I have two websites, let's say SiteA and SiteB. SiteA is using form authentication and SiteB is using Windows authentication. the user's name and password stored in siteA is same as the one in Active Directory. Sometimes, the user need to be navigated to SiteB from SiteA. So the user who has login on SiteA would have to type in their username and password in AD( which excatly the same one with they used for SiteA ) again to access SiteB.
So my question is : I can put the username and password(after encrypted) in the url to access SiteB when the navigation happened, is there any way we can complete the windows authentication in code so the user don't have to type their username and password again?
shree_ars
Participant
1395 Points
776 Posts
Re: how to do the windows authentication automatically
Dec 28, 2012 08:38 AM|LINK
there is a concept of single-sign-on.
which handles the multiple website to be loggedIn with single credentials.
check this,
www.codeproject.com/Articles/106439/Single-Sign-On-SSO-for-cross-domain-ASP-NET-applic
ramondlee
Member
1 Points
8 Posts
Re: how to do the windows authentication automatically
Dec 28, 2012 02:42 PM|LINK
that is a great post, but it is talking about the form authentication all the time. But I am working on two sites under different authentication mode, one is form authentication and the other one is windows authentication.
css-chlukito
Member
376 Points
48 Posts
Re: how to do the windows authentication automatically
Jan 04, 2013 05:58 AM|LINK
Hi,
You can check on this links, it show you how to authenticate to AD:
- http://msdn.microsoft.com/en-us/library/ms180890%28v=vs.90%29.aspx
- http://www.codeproject.com/Articles/18742/Simple-Active-Directory-Authentication-Using-LDAP
Please 'Mark as Answer' if this post helps you.
ramondlee
Member
1 Points
8 Posts
Re: how to do the windows authentication automatically
Jan 07, 2013 01:13 AM|LINK
hi,
thanks for your reply. Both posts are talking about how to check the user with AD. But my question is after I can make sure the user's identity with AD, how can I tell the HttpContext.Current about this principal and let the ASP.NET know that this is a authenticated user, so the browser won't ask user to input their username and password.