1
votes

I have two web applications.
A.Test.Com and B.Test.Com
A.Test.Com has a login page A.Test.Com/Login.aspx. B.Test.Com does not have a login page.
B.Test.Com has the forms loginUrl = A.Test.Com/Login.aspx and B.Test.Com has deny users = ?
Both A & B has the exact same machineKey and have enableCrossAppRedirects = true.
I followed this article to get the correct ReturnUrl sent from B to A.
http://blogs.freshlogicstudios.com/Posts/View.aspx?Id=cb739183-6a0b-46bc-9179-22aed8e60433

When I go to B.Test.Com, I get sent to http://A.Test.Com/Login.aspx?ReturnUrl=http://B.Test.Com
This is correct. Then when I use the login page it calls FormsAuthentication.RedirectFromLoginPage(user,false).
This never redirects to B.Test.Com. It just stays on the login page.
I have also tried Response.Redirect(FormsAuthentication.GetRedirectUrl(user,false),true) but that does not work.

Other articles I have reviewed.
http://w3facility.info/question/forms-authentication-redirect-back-to-original-domain/
http://weblogs.asp.net/dfindley/fix-returnurl-when-sharing-forms-authentication-with-multiple-web-applications
http://forums.asp.net/t/1652342.aspx?+ReturnUrl+and+subdomain+for+single+sign+on
http://forums.ext.net/showthread.php?19349-CLOSED-Forms-authentication-RedirectFromLoginPage-not-working

Any help would be much appreciated.

EDIT --
So I see what is going on but I still don't know how to solve it.
Both A.Test.Com and B.Test.Com require authentication.
When I go to B.Test.Com I get redirected to A.Test.Com/Login.aspx because I am not authenticated.
Once I click the login button I am redirected to B.Test.Com but site B does not think I am authenticated so it redirects me back to A.Test.Com/Login.aspx.

1

1 Answers