Solved

Can you explain how redirect to localhost works?

Posted on 2007-11-20
4
977 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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 …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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