I am using RedirectFromLoginPage in my vb.net web app(.net 4). It works fine in my dev environment, but fails in my production environment.
When I login through dev, I get this URL:
http://localhost:63509/Account/Login.aspx?ReturnUrl=%2fDefault.aspx
However, when I push it to production, and login, I get this URL:
http://aaa.aaa.edu/Account/Login.aspx?ReturnUrl=%2f
My web.config looks like this:
<authentication mode="Forms">
<forms loginUrl="Account/Login.aspx" timeout="300" defaultUrl="yourView.aspx" />
</authentication>
I’ve verified that my default document on my IIS 7 web server is Default.aspx. I even set it in web.config to make sure.
Is there anything I could do to fix this?
The authorization section of web.config looks like this:
<authorization>
<deny users="?" />
</authorization>
Thanks
In the web.config, what does the section look like? It should read as follows:
Or, it may be a cookie issue. Are you explicitly setting FormsAuthentication.CookieDomain anywhere? Since you’re using a subdomain that could cause an issue. Also, try clearing the cookies in your cache or trying to login via a different browser to see if it’s a cookie issue.