Hello,
I am attempting to share forms authentication between two applications
but running into problems. The documentation I've been able to dig up
says (to summarize) if the the Web.Config settings are the same between
the apps they should work happily together. The only difference I have
between the apps Web.Config settings is their <forms> loginUrl, which
isn't supposed to make a difference.
App1 Web.Config:
<authentication mode="Forms">
<forms name="AuthenticationCookie"
loginUrl="login.aspx"
protection="All"
timeout="30"
path="/"/>
</authentication>
App2 Web.Config:
<authentication mode="Forms">
<forms name="AuthenticationCookie"
loginUrl="/App1/login.aspx"
protection="All"
timeout="30"
path="/"/>
</authentication>
You'll note that the the only change is loginUrl for App2 is updated to
point to the login form of App1.
Both apps have the same <authorization> tag:
<authorization>
<deny users="?" /> <!-- Deny all users -->
</authorization>
Neither app is set to encrypt the cookie data.
The problem is that I never get sent back to the calling page in App2.
The return url is correct (as seen in the address bar of the browser
after being redirected to the login page). But after being
authenticated, I just get redirected to the login page again. Login
failures are being handled correctly, so I know I'm typing the
username/password correctly.
Any thoughts?