0

I'm working on a web application and instead of using Membership I use the FormsAuthentication directly.

The problem is when I do a Form post I'm able to get all of the fields but it is not parsing the query strings.

When I look in the debugger the query string is there in the URI but not in the QueryString array.

I'm trying to get the ReturnUrl from the query string so I can make the login page go to the correct spot.

1 Answer 1

1

You don't need to parse that QueryString; try just call in your login page:

if(Request.Params["ReturnUrl"] != null)
{
    FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie);
}
Sign up to request clarification or add additional context in comments.

2 Comments

The problem I'm having is the Query string is not showing up in the QueryString[] so the Request.Params["ReturnUrl"] will not work for me.
cant you just call FormsAuthentication.RedirectFromLoginPage?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.