473,378 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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
0 1193

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Mariam | last post by:
Hi, all, We have mutiple ASP.NET web applications and setup on mutiple web servers (win2k, .netframework 1.1). All the web applications are setup to use Forms authentication. All the applications...
0
by: Tomk | last post by:
When I logout of my application I redirect to the login page. However the ReturnURL is placed in the querystring so if the user logs back in it goes back to the last page where the logout occured....
4
by: Chicagoboy27 | last post by:
All I am trying to find a solution for removing the ?returnUrl if a user is not authenticated. I want to be redirect an unauthenticated user to the login.aspx less the returnUrl. Once they log...
7
by: vvkl | last post by:
I have readed a example code from MSDN about FormsAuthenticationTicket calss, but there's a line I can't understand : 'strRedirect = Request;' What's the mean in which square brackets? Thank...
1
by: mark4asp | last post by:
Ok so my previous message about the vanishing ReturnUrl value was also lost! - grrrr Fate - I'll get my revenge on you - if you think you can toy with me like this! I decided to change the form...
10
by: semomaniz | last post by:
Hello, I have a database interface that needs to have a login authentication set up. SO for this I have a login view inside which i have the login control and i have accomplished the...
0
by: tranky | last post by:
Hi, i've a problem, and i know you can help me to solve it. I'm using Asp Net and Form Authentication. When i'm anonymous and i must show a protected page, i'm redirected into a login.aspx page...
1
by: tranky | last post by:
Hi, i've a problem, and i know you can help me to solve it. I'm using Asp Net and Form Authentication. When i'm anonymous and i must show a protected page, i'm redirected into a login.aspx page...
0
by: tranky | last post by:
Hi, i've a problem, and i know you can help me to solve it. I'm using Asp Net and Form Authentication. When i'm anonymous and i must show a protected page, i'm redirected into a login.aspx page...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.