My returnURL is not working in production
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:
However, when I push it to production, and login, I get this URL:
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>
In the web.config, what does the section look like? It should read as follows:
<authorization> <deny users="?"/> </authorization>
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.