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

M

mark4asp

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top