Solved

Can you explain how redirect to localhost works?

Posted on 2007-11-20
4
968 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now