Questions tagged [returnurl]

Is the URL where a user is redirected after being authenticated.

When attempting to visit a page that requires authentication, a web application can pass the original URL as a parameter to logon page. After authentication is successful, user is redirected to the URL they originally tried to visit.

Example in Asp.Net forms authentication:

  1. User tries to visit http://localhost/myProject/findex.aspx but is not authenticated.
  2. Server detects no session cookies in the request and redirects to logon page, specifying ReturnUrl as parameter by encoding the original Url. http://localhost/myProject/Myloginform.aspx?ReturnUrl=%2fmyProject%2findex.aspx
  3. After successful authentication, user is redirected to ReturnUrl: http://localhost/myProject/findex.aspx
96 questions
497
votes
23 answers

Facebook Callback appends '#_=_' to Return URL

Facebook callback has started appending #_=_ hash underscore to the Return URL Does anyone know why? What is the solution?
zing ming
  • 4,971
  • 3
  • 12
  • 4
17
votes
10 answers

A smart way to handle Return URLs in an MVC environment

A problem I come up against again and again is handling redirection to the previous page after a user runs some action such as clicking a 'Back To ...' link or saving the record they are editing. Previously whenever I have needed to know what page…
dnatoli
  • 6,752
  • 7
  • 51
  • 95
10
votes
1 answer

Get full URL with hash to use as ReturnUrl

I have such URL localhost/Login/LogOn?ReturnUrl=/#&q=my%20search%20word&f=1//447044365|2//4 I need to get hash parameters to navigate in the application after authentication. I try to catch it like this
podeig
  • 2,394
  • 6
  • 31
  • 53
7
votes
2 answers

Unit testing Url.IsLocalUrl(returnUrl.ToString()), how can I get it to return false in unit test?

From the standard LogOn method in the account controller in MVC3 applications, how can I test the Url.IsLocalUrl(returnUrl.ToString()) line of code where the url is not local? In other words, what url do I have to feed into this line of code when…
DevDave
  • 6,221
  • 11
  • 59
  • 96
6
votes
3 answers

HttpPost to ReturnURL after redirect

I am writing an ASP.NET MVC 2.0 application which requires users to log in before placing a bid on an item. I am using an actionfilter to ensure that the user is logged in and, if not, send them to a login page and set the return url. Below is the…
JP.
  • 5,327
  • 6
  • 53
  • 98
5
votes
7 answers

How to set returnUrl value in Yii

I am using Yii and the problem I am getting is with the Yii::app()->user->returnUrl. It always returns me to the index.php page. How can I set its value to the page which requested the current page as I do not know from which page user has visited …
Let me see
  • 4,819
  • 5
  • 31
  • 45
5
votes
4 answers

How to elegantly handle ReturnUrl when using UrlRewrite in ASP.NET 2.0 WebForms

I have a folder with multiple .aspx pages that I want to restrict access to. I have added web.config to that folder with . The problem is that ReturnUrl is auto-generated with physical path to the .aspx file while I'm using…
Brian Kim
  • 23,136
  • 6
  • 35
  • 25
4
votes
2 answers

MVC3 Redirect after login

Been trying to put together an mvc login page that will redirect back to the original page that required authorization based on other stack overflow posts. Redirect with protected override void HandleUnauthorizedRequest(AuthorizationContext…
DMulligan
  • 8,583
  • 6
  • 29
  • 33
4
votes
2 answers

Pass returnUrl from ActionLink from view to Login Form that redirects back to view

I have read many SO posts about returnUrl as it pertains to forms authentication by default of [authorize] MyController, but I haven't read anything on simply passing the returnUrl where the only authentication takes place after the [HttpPost] with…
yardpenalty.com
  • 1,138
  • 2
  • 15
  • 28
3
votes
2 answers

Internet Explorer, Safari, Opera removes hash value from returnUrl

I want to keep hash value in returnURL when user is sent to LogOn controller, but IE7-9/Safari/Opera removes it. For example, I try this URL http://localhost:18314/#&t={DA3DB617-F9A3-4668-93E6-BBB2E37B928F} User is not authorized and sent to LogOn…
podeig
  • 2,394
  • 6
  • 31
  • 53
3
votes
4 answers

What is ReturnURL in mvc3

What is Return URL in mvc3? When i write down my url in adress bar of the browser, at the append return url is automatically appended to it. How this happnes? I provide the following url in adress bar http://localhost:55875/admin and after…
user3056239
  • 61
  • 1
  • 8
2
votes
2 answers

encoding returnUrl query string in ASP.NET MVC

I'm trying to pass ReturnUrl query string to my login page. I have a partial Login view (kind of like a login box) and a login view. Right now, I have the following line in my partial view: using (Html.BeginForm("Login" ,…
Kamyar
  • 18,123
  • 8
  • 90
  • 164
2
votes
2 answers

Specify returnURL In QueryString

This is probably a simple question but I am struggling with returnurl in a querystring. I know how to call the returnurl in a querystring into a Response.Redirect but I am not sure how to set the returnurl to a certain url. Can someone give me a…
Jamie
  • 107
  • 2
  • 9
2
votes
1 answer

How To Make Paypal Return URL Visible Only To Payers?

I need a solution to prevent visitors to reach pay-pal return url ( success page ) if they did not pay or paid but want to visit again . How can I make a visitor see this returl url only 1 time right after paid via pay-pal ? Thank you for your…
Bilal
  • 21
  • 3
2
votes
0 answers

Paypal auto return is not redirecting after successful payment

I have been struggling for the past few days trying to get Paypal to redirect to my website after a successful payment. Instead, it shows this "Thank you for your order" and asks me to click on a link to return to the merchant page, from which it…
Christopher Richa
  • 1,272
  • 1
  • 8
  • 20
1
2 3 4 5 6 7