By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,087 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Why does the ReturnUrl vanish and what can be done to prevent that?

P: n/a
The login page is: http://localhost:1086/Client/Default.aspx
The default page is: http://localhost:1086/Client/News/News.aspx

i.e. I have the following in web.config

<authentication mode="Forms">
<forms name="AcmeCo" loginUrl="Default.aspx" defaultUrl="News/
News.aspx"
protection="All" cookieless="AutoDetect"
slidingExpiration="true" />
</authentication>

I open up a new browser.

I enter the following into my address bar:

http://localhost:1086/Client/Search/Search.aspx

Immediately the url in my browser changes to: http://localhost:1086/Client/Default.aspx

Q1: How can I debug the application to work out why the ReturnUrl is
being lost?
Q2: What can I do to stop the ReturnUrl being lost?
Q3: Must I have ViewState on to keep this ReturnUrl accross postbacks?
(I think that's the problem - there is no ViewState. However the form
reads:

<form method="post" id="frmMain"
action="default.aspx<%if(Request.QueryString["ReturnUrl"] != null)
Response.Write("?ReturnUrl=" + Request.QueryString["ReturnUrl"]);%"
>
This login page has no asp.net login controls - only html ones.

Apr 25 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.