Solved

Can you explain how redirect to localhost works?

Posted on 2007-11-20
4
975 Views
Last Modified: 2008-02-01
In an application developed in asp.net 1.1 with c# I implemented a change to incorporate 3-D Secure for credit card payments. This involves redirecting customers to another site to validate their card and then the customer is redirected back to our site. When redirecting a dynamically generated page containing hidden values, including a return url, is posted to the other site. I using string redirecturl = Request.Urlreferrer.AbsoluteUrl + "?Redirect=y" to set up the return url. What I have found and didn't expect is that even when I run a local copy of the application it still returns back.
0
Comment
Question by:JamesJMcDonnell
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:john_steed
ID: 20319916
Hey,

The redirect to localhost only works on computers that have the website installed on their localhost. You're code however should be correct, since when you move to a production environment, the return url will be correct

Hope this helps
0
 

Author Comment

by:JamesJMcDonnell
ID: 20320168
Just checking: So if the site is being developed on a pc's c: drive with a virtual directory in iis, then that means the site is installed on the pc ? and also another site is able to redirect back to the application running locally on that pc?  But how can their be a unique IP address, is this not needed?
0
 
LVL 3

Accepted Solution

by:
john_steed earned 500 total points
ID: 20320227
http://localhost always refers to your own computer. Other sites can redirect back to it, but only when YOU open those sites in your browser.
It won't work if someone else gets redirected to localhost (because it will search for a site on his PC)
0
 

Author Comment

by:JamesJMcDonnell
ID: 20320956
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question