c# - asp.net Domain / Subdomain Authentication not working correctly -


i have w2k3 server hosts 2 sites under iis, such have mysite.com , foo.mysite.com

i trying use forms authentication , single sign on.

both sites have same machine key, , same domain prefixed . in web.configs.

the 2 issues have are;

1) if go http://www.mysite.com/login.aspx, , login, navigate subdomain redirects me login page.

but if go http://mysite.com/login.aspx , login, navigate subdomain works. why seeing www.mysite.com , mysite.com seperate domains , invalidating authentication?

it understanding adding domain=".mysite.com" work sub sites under domain.

2) if change subdomain login url mysite.com not www.mysite.com , hit subdomain first, redirects login form fine, when log in not redirect subdomain, rather looks subdomain page on main site. i.e. browse foo.mysite.com/bar.aspx, redirects login page, , when logged in tries show mysite.com/bar.aspx not page first requested.

any explaining , resolving these issues welcome!

thanks

as update this. found workround redirect issue elsewhere on site. dont know why doesnt work i'd expect, can cross 1 off.

secondly (on test system anyway) programatically specifying domain works www. whereas using domain="" in teh config file not.

why specify domain? also, why not use config inheritance, can work across app pools.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -