Link to home
Start Free TrialLog in
Avatar of JeffBeall
JeffBeallFlag for United States of America

asked on

web development asp

i have a web page at work i have to move from the server it is on to another server. the webpage was written in asp. i know NOTHING about web development and coding in anything, but i have been around long enough to have picked up some things.
when i copied the directory that has the website's files to the other server ( both servers are windows server 2003 with IIS6 ) and set it up in IIS, if i open the IIS manager and browse default.asp, the webpage opens but i think it direct me to the old server - which i need to keep up until i transfer the site to the new server. if i try to open the webpage on a computer on the same network as the new server, i open ie on the computer and in the address bar i type in
http://ipaddress of new server
i get re-directed to a completely different ip address that isn't on my network and the page can't be found. i found in the files on the website another file called default.aspx, and it has
<%@ Page Language = "C#" %>

<%
      Response.Redirect("http://198.170.242.235/home/");
%>
which is where i get redirected to, so i assume that when i type
http://ipaddress of new server
something in the bowels of the asp code tells the browser to redirect to the above address.
i tried simply putting my new server's address in
Response.Redirect("http://address of new server
but then it seems to cause a loop that the server has a hard time breaking out of.
so is there a typical or default place that asp has to "tell" the browser to redirect?
if so, does it make sense that i could tell asp to stop redirecting?
if that is so, how could i have asp stop redirecting? please keep in mind i know NOTHING about coding in asp,
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

This is ASP.NET C#
And the redirect is redirecting to the other IP address.
Change it to the IP address of the server that is NEW, and then test

Carrzkiss
Avatar of JeffBeall

ASKER

"Change it to the IP address of the server that is NEW, and then test"

i said in my description

"i tried simply putting my new server's address in
Response.Redirect("http://address of new server
but then it seems to cause a loop that the server has a hard time breaking out of"

so i tried the address of my new server already, but like i said it seems to cause a loop, the server has a hard time responding and at the bottom of ie it looks like it is rapidly contacting my new server and getting a response over and over.
Remove the Redirect


What else is on the page, post the code.
"What else is on the page, post the code"

which file? there are several asp files

also, i tried removing the default.aspx file that has

<%@ Page Language = "C#" %>

<%
      Response.Redirect("http://198.170.242.235/home/");
%>

but then the webpage hangs as if it is looking for default.aspx, because when i put it back it redirects right away. also, there is a default.asp, and a default.aspx file fyi.
OK, The file that is loaded first is the default.aspx file.
That is the file that I want to see ALL the code for, I need to know what is in it.

Also.
Look at your other site, what is in the /home/ folder.
It seems to me, that you are using the page load default.aspx
And then it is redirecting to another page all together.
SO, what is the page name that is loading in the /home/ directory?
in the default.aspx file, this is it
<%@ Page Language = "C#" %>

<%
      Response.Redirect("http://198.170.242.235/home/");
%>

that's all there is to it.

on the old server it is the same thing. i just copied the whole folder from the old server to new.
OK, when the site loads, what is the url?
Basically, something like this.
http://198.170.242.235/home/index.aspx or other...

OK, then in the redirect, you want to redirect to

<%
' If you are in the same folder
response.redirect"index.aspx"
%>

This will allow you to load the pages on the new server.
the actual url is
http://www.itwtekfast.com

"<%
' If you are in the same folder
response.redirect"index.aspx"
%>
"
do i literally type in if you are in the same folder? like i say, i don't know how to code but my instinct tells me asp wouldn't understand "If you are in the same folder"
That is a coded not, just stating that if the file is in the same folder.
Then type index.aspx, if it is not in the same folders, then you will have to type
The folder structure.

But, no, you do not have to type in the notes.
so

' If you are in the same folder

is commented out by the ' ?

so i just need the following.

response.redirect"index.aspx
Just this

<%
response.redirect"index.aspx"
%>
yea!! that fixed the redirect thing, but now i think it doesn't like index.aspx. i do to the ip address on my new server ( http://ipaddressofnewserver)
and it complains about this

Compiler Error Message: CS1002: ; expected

Source Error:

Line 2:  
Line 3:  <%
Line 4:        response.redirect"index.aspx"
Line 5:  %>

Source File: c:\Tekfast site\default.aspx    Line: 4

i took a screen shot of the fold the files sit in and there isn't an index.aspx, would that be the problem?

 User generated image
It is missing the semo-colon at the end.
Replace with this, or just add the semi-colon to the end.
<%
response.redirect"index.aspx";
%>
There is no Index.aspx showing in the tree.
Where is it located at?
It seems to me that this is just a landing folder for whatever reason.
Where is the folder for /home/ at?
You might want to change it to.

<%
response.redirect"http://IPADDRESSHERE/home/index.aspx";
%>
i changed it to

<%
response.redirect"http://IPADDRESSHERE/home/index.aspx";
%>

but i'm still getting the error, then i noticed that the properties of the website in IIS manager has a asp tab i attached a screen shot. the thing is, it shows a web.config file, but i dont have a web.config file on the old or new server. and the edit the global configuration and the edit configuration buttons when i click on them, are blank? User generated image
ASKER CERTIFIED SOLUTION
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I said

"i changed it to

<%
response.redirect"http://IPADDRESSHERE/home/index.aspx";
%>"

but i still get the error - is

"IPADDRESSHERE"

supposed to be the ipaddress of my new server?
as far as this classic asp pointing to asp.net, this is an old site and we had someone who obviously didn't know what they were doing mess with it. and of course now our capital projects are on hold, so i doubt i could have this looked at by a qualified person such as yourself.
that is why i really appreciate how much you have put into this already.
i'll try to see if we can have this looked at by an actual programmer.
i'm going to close this so i can give you all the points.
thank you so much for all the help.
IPADDRESSHERE
This is suppose to be your IP Address for your server.
So for example, it will be

<%
response.redirect"http://192.168.2.1/home/index.aspx";
%>

Now, replace that IP Address with the actual IP Address of the New Server.
And you should be good to go.

As for taking a look at the site.
You can contact me off EE, but looking at my profile, at the top you will see my email address.

Take Care and enjoy the rest of your weekend.

Carrzkiss