How to Redirect to another website on the same location

G

glezaber

Hi, I´ve two websites stored in IIS 5.0, and what I want is to
Redirect from A website to B website, the problem is that doesn´t work
because if I use Response.Redirect (http://localhost:5080) where is the
A website from the B, it only works in the same machine, because if you
try doing it from another one it takes de localhost directly without
asking for the correct parsing. I tryed too doing it with the
Server.Transfer, but that doesn´t work any more.

Any ideas?

Thanks!
 
G

glezaber

Thanks for your reply, I´m not quite sure, I´m new in asp.net, but
perhaps I have not been clear.

This is how the IIS lookslike

LocalMachine

---WebsiteA (localhost:5080)

---WebsiteB(localhost:80)


The WebsiteB has been registered by DNS so you can access from remote
computers, but what I want is to redirect to WebsiteA when you click in
a webform of site B. As I said it works with
Response.Redirect(http://localhost:5080), but only locally, if you try
the same from the outside it treats "localhost" as a local variable,
and perhaps the correct way for doing this is using Server.Transfer,
but it doesn´t work anymore.

Thanks again for your attention.
 
G

Gozirra

The target url used in server.transfer must be within the same
application which is why it is failing. Is there a reason why you
can't register the other site with DNS as well? Are these sites
published on the web or are they intranet sites?

Standard practice in this situation would be to use Response.Redirect
which would require that the other site be registered in DNS(you could
also get away with IP address). The only other option that I have off
the top of my head would be to create a webrequest and pull the html
from the resulting call. Then you can send the response back to the
client. I don't believe that this will work if the application
requires user interaction.

Why do you need to do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top