views:

464

answers:

2

I want to log in for 1 application and use the same login token to authenticate the second application. I have used the same application name so both applications use the same membership provider.....

I have 2 web applications, using asp.net 3.5, c#, hosted in IIS 7.0. I use the aspnet_membership provider for authentication/authorization

They are hosted side by side as 2 seperate applications . The question is can I log in for 1 application and be authenticated for the other by using the same log in....

Thanks in advance

Stuart

+1  A: 
Zaagmans
thanks, that worked .. I knew it had to be easy :)
Stuart
+1  A: 

Its called Single Sign On - SSO and its fairly simple to do if your applications are hosted on the same domain (app1.domain.com and app2.domain.com - or - domain.com/app1 and domain.com/app2), its fairly straightforward to do so.

When you create a cookie using the Forms Authentication, set the domain as ".domain.com". Also, both the Applications would have to use the same Machine Key within web.config.

Check out http://www.codeproject.com/KB/web-security/aspnetsinglesignon.aspx and http://weblogs.asp.net/hernandl/archive/2004/06/09/ssoformsauth.aspx

Abhishek
thanks, seems like the sort of thing I want, I'll check it out
Stuart
cool. glad to help :)
Abhishek
worked , thanks for the input :)
Stuart