Error: Page redirects to default page for first time using Forms Authetication
In this article I have explained about the Error "Page redirects to login/default.aspx page for first time login" and its resolution.
In this article I have explained about the Error "Page redirects to login/default.aspx page for first time login" and its resolution. This error occurs usually when FormAuthetication is being used.
The cause is basically when we use the method called "FormsAuthentication.GetRedirectUrl"
Whenever you try access page it will first redirects to login page, if its not authenticated then it will redirect to the return url. Many cases it is default.aspx.
"on clean machine... (Delete cache, temporary files and IIS restart etc..) when enableCrossAppRedirects is not set, when you call any page(example.aspx) it calls login.aspx, clean machine CrossAppRedirect = false, so after authentication login.aspx doesn't have RedirectUrl to that page((example.aspx)) but to default.aspx...
Please refer to the below article which provides the complete resolution of this.
"http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.getredirecturl.aspx"
I have faced this error and took 2 days to identify and get the proper solution.
Reference: http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.getredirecturl.aspx