Single Sign On for two sites of different domains.
-
Hi I have two different sites say www.domain1.com & www.domain2.com developed in asp.net 2.0. I want that user logs in www.domain1.com , and then clicks the hyperlink to www.domain2.com, then he should not be shown the login page of www.domain2.com. some sample code will be of great help to me. thanx sandy
-
Hi I have two different sites say www.domain1.com & www.domain2.com developed in asp.net 2.0. I want that user logs in www.domain1.com , and then clicks the hyperlink to www.domain2.com, then he should not be shown the login page of www.domain2.com. some sample code will be of great help to me. thanx sandy
You can use generic priciple, which creates username and the roles assigned to him. --When you redirect the user, pass the Context of first webpage through the URL to second page. --In the second domain check the incoming URL, if there is any context, then validate it and allow or deny user accordingly. --Deny can redirect the user to Login page. hope this helps, I have assumed that you know how the .net security works (Context, IIdentity etc).
-
Hi I have two different sites say www.domain1.com & www.domain2.com developed in asp.net 2.0. I want that user logs in www.domain1.com , and then clicks the hyperlink to www.domain2.com, then he should not be shown the login page of www.domain2.com. some sample code will be of great help to me. thanx sandy
hello sandeep, Use ASP.NET Configuration tool for doing this.Here u can assign security,providers and roles etc ...By setting this change the code according in C#.net .. ok byeee Murali Murali
-
You can use generic priciple, which creates username and the roles assigned to him. --When you redirect the user, pass the Context of first webpage through the URL to second page. --In the second domain check the incoming URL, if there is any context, then validate it and allow or deny user accordingly. --Deny can redirect the user to Login page. hope this helps, I have assumed that you know how the .net security works (Context, IIdentity etc).
RepliCrux wrote:
When you redirect the user, pass the Context of first webpage through the URL to second page.
What do you mean by Context ? and how it can be passed with URL ?
-
RepliCrux wrote:
When you redirect the user, pass the Context of first webpage through the URL to second page.
What do you mean by Context ? and how it can be passed with URL ?
When you Create Generic Priciple, You pass in all the roles to the Context of the page, then you check the user role like: If(Context.Users.IsInRole("Manager")) { //Do Something } You cannot pass the whole context itself, but pass the contents of the Context, (IIdentity,Roles..etc), then create a new Generic Priciple in the destination page usring those values and validate the Context of the page simillarly.
-
When you Create Generic Priciple, You pass in all the roles to the Context of the page, then you check the user role like: If(Context.Users.IsInRole("Manager")) { //Do Something } You cannot pass the whole context itself, but pass the contents of the Context, (IIdentity,Roles..etc), then create a new Generic Priciple in the destination page usring those values and validate the Context of the page simillarly.
That looks fine. But your previous message sounds like passing context object in URL. So I was confused.