Solved

Can you explain how redirect to localhost works?

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Save ms data to server side. 19 59
Returning a value from a class function to a partial view in MVC5 7 46
asp.net web application 3 44
Asp.Net Session Question 2 34
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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