Firstly, apologies for the cross post, but this issue is getting really frustrating.
I'm developing a website at the moment and all was working well until I decided to test remotely. From the local box, or other machines on the internal LAN, I can get at all pages. I have my router forwarding port 80 to the web server and if I enter the
full internet address for accessing the web page, all is well. I've created a page in case anyone wants to see for themselves.
Does anyone have any ideas? I've tried playing with http redirection, etc but no luck so far. It seems odd that the internet IP Address works, but not the web forwarded one, which should be just replacing the domain name with my IP address
Hi, Thanks for the prompt reply. I'm I don't know what host headers are, so the answer to you question is probably no.
Could you possibly let me know where I can set this up. I've just had a look at the IIS Manager (iis7 on vista), but couldn't find anything.
Is this a normal thing to setup on all websites, as they are usually accessible via a domain name and IP Address, or is it something specific to me as I'm port forwarding from my router?
This is something that you need to do for ALL websites, it's how you can run multiple websites from the same server (ie. the same IP address, but each website has its own URL).
No idea about IIS7, but under IIS5/6 if you check the website IP address..Advanced... you come to a screen which says "Multiple identities for this web site".
It'll have an entry for Default (which is usually the IP address) and a TCP port (usually 80)
To have a domain name mapped to this particular website, you'll need to click on Add... and then enter the TCP port (80) and the Host header name...in this case it's "www.titanic-collector.co.uk"
This will map any requests to that url through to THAT particular website.
If you're not using host headers to support multiple sites on a single IP, it's not a host header issue. IIS doesn't answer on a domain name, only on an IP address. DNS converts the name to an IP. So there should be no difference between using the domain
name and the IP if the DNS resolves correctly. There is definitely no difference in that process that allows a HTML page to work and prevents an ASP.NET one from working. So your issue is one of two things.
If you are specifying the file name in the URL, as you posted, it is not an issue of default document setting. However if you only use the domain or IP address and no file name, check the default document list in IIS.
If that's not the problem, you are doing something in your ASP.NET application to cause this. Running the DNN framework and not setting the portal alias correctly could cause this for example. Test with a Helllo World ASPX file to make sure ASP.NET is
installed and working correctly.
Okay, forget the answer I just posted, your description is wrong. You see the ASPX page fine, it just is a 404 error. Meaning everything works but you probably didn't enable ASP.NET as a web service extension or you don't have ASP.NET configured correctly.
Or possibly the page doesn't exist simply because it really doesn't exist.
Thanks again for the reply. I'm a little confused however as I only have 1 website on the server. I'm just having different results depending on if I use the domain name, or the IP Address.
Is there any way to track how far it's getting before the "resource cannot be found" comes up? I cant understand why 123-Reg (whom I've registered the domain name with) change the domain name to the IP address when it works with html pages, but doesn't
swap it out on the aspx pages which are failing. Or so it seems from IE
Okay, forget the answer I just posted, your description is wrong. You see the ASPX page fine, it just is a 404 error. Meaning everything works but you probably didn't enable ASP.NET as a web service extension or you don't have ASP.NET configured correctly.
Or possibly the page doesn't exist simply because it really doesn't exist.
Jeff
That's what I thought initially, but browsing the page via the IP address works fine, just not when the domain name is used - which could be caused by having multiple sites set up. If it was set up correctly, I'd expect the same error for both IP and domain
name calls to IIS.
Different error messages when you try and browse files (try browsing to web.config on both, in one it's just missing, in the other it's "been explicitly forbidden"...meaning that
one site is set up for ASP.Net, and one is not...the one that IS set up for ASP.Net is the one that says it's "been explicitly forbidden")
BobbyOwens
0 Points
11 Posts
Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 02:52 PM|LINK
Hi,
Firstly, apologies for the cross post, but this issue is getting really frustrating.
I'm developing a website at the moment and all was working well until I decided to test remotely. From the local box, or other machines on the internal LAN, I can get at all pages. I have my router forwarding port 80 to the web server and if I enter the full internet address for accessing the web page, all is well. I've created a page in case anyone wants to see for themselves.
e.g. http://86.16.243.2/welcome.aspx
I also have a domain name registered that forwards to my IP Address, but if I enter that address, I can't see any aspx pages
e.g. http://www.titanic-collector.co.uk/welcome.aspx
If I open a plain html page however, i can see it fine
e.g. http://www.titanic-collector.co.uk/default.htm
Does anyone have any ideas? I've tried playing with http redirection, etc but no luck so far. It seems odd that the internet IP Address works, but not the web forwarded one, which should be just replacing the domain name with my IP address
thanks in advance
Bobby
Mr^B
Star
12726 Points
2245 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:09 PM|LINK
Has the host header in IIS been set up correctly?
You should have TWO on that website, one with the IP address, and another with the full domain name.
BobbyOwens
0 Points
11 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:16 PM|LINK
Hi, Thanks for the prompt reply. I'm I don't know what host headers are, so the answer to you question is probably no.
Could you possibly let me know where I can set this up. I've just had a look at the IIS Manager (iis7 on vista), but couldn't find anything.
Is this a normal thing to setup on all websites, as they are usually accessible via a domain name and IP Address, or is it something specific to me as I'm port forwarding from my router?
Mr^B
Star
12726 Points
2245 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:27 PM|LINK
Hi,
This is something that you need to do for ALL websites, it's how you can run multiple websites from the same server (ie. the same IP address, but each website has its own URL).
No idea about IIS7, but under IIS5/6 if you check the website IP address..Advanced... you come to a screen which says "Multiple identities for this web site".
It'll have an entry for Default (which is usually the IP address) and a TCP port (usually 80)
To have a domain name mapped to this particular website, you'll need to click on Add... and then enter the TCP port (80) and the Host header name...in this case it's "www.titanic-collector.co.uk"
This will map any requests to that url through to THAT particular website.
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:33 PM|LINK
If you're not using host headers to support multiple sites on a single IP, it's not a host header issue. IIS doesn't answer on a domain name, only on an IP address. DNS converts the name to an IP. So there should be no difference between using the domain name and the IP if the DNS resolves correctly. There is definitely no difference in that process that allows a HTML page to work and prevents an ASP.NET one from working. So your issue is one of two things.
If you are specifying the file name in the URL, as you posted, it is not an issue of default document setting. However if you only use the domain or IP address and no file name, check the default document list in IIS.
If that's not the problem, you are doing something in your ASP.NET application to cause this. Running the DNN framework and not setting the portal alias correctly could cause this for example. Test with a Helllo World ASPX file to make sure ASP.NET is installed and working correctly.
Jeff
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:37 PM|LINK
Okay, forget the answer I just posted, your description is wrong. You see the ASPX page fine, it just is a 404 error. Meaning everything works but you probably didn't enable ASP.NET as a web service extension or you don't have ASP.NET configured correctly. Or possibly the page doesn't exist simply because it really doesn't exist.
Jeff
BobbyOwens
0 Points
11 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:40 PM|LINK
Hi,
Thanks again for the reply. I'm a little confused however as I only have 1 website on the server. I'm just having different results depending on if I use the domain name, or the IP Address.
I've found the bindings in IIS 7 and added the www.titanic-collector.co.uk but I got the same results :(
Is there any way to track how far it's getting before the "resource cannot be found" comes up? I cant understand why 123-Reg (whom I've registered the domain name with) change the domain name to the IP address when it works with html pages, but doesn't swap it out on the aspx pages which are failing. Or so it seems from IE
Mr^B
Star
12726 Points
2245 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 03:42 PM|LINK
That's what I thought initially, but browsing the page via the IP address works fine, just not when the domain name is used - which could be caused by having multiple sites set up. If it was set up correctly, I'd expect the same error for both IP and domain name calls to IIS.
BobbyOwens
0 Points
11 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 04:14 PM|LINK
That's exactly whats confusing me. The way I see it, internally browsing to http://bobbyspc/welcome.aspx should be identical to http://192.168.0.1/welcome.aspx provided that bobbyspc is 192.168.0.1
Therefore I don't understand why http://www.titanic-collector.co.uk/welcome.aspx acts differently to http://86.16.243.2/welcome.aspx as from what I understand, the web forwarding service just takes www.titanic-collector.co.uk and replaces it with 86.16.243.2 and sends the request to my router, which in turn forwards all port 80 requests to my own machine.
I get the feeling this is going to be something ridiculously simple that I'm overlooking, but I have no idea what
Mr^B
Star
12726 Points
2245 Posts
Re: Cant open aspx using domain name, but can with IP Address
Feb 05, 2009 04:27 PM|LINK
Are you sure there are no other websites set up on that server? Or using that IP address?
http://86.16.243.2
seems to be a completely and utterly different website to
http://www.titanic-collector.co.uk
Different error messages when you try and browse files (try browsing to web.config on both, in one it's just missing, in the other it's "been explicitly forbidden"...meaning that one site is set up for ASP.Net, and one is not...the one that IS set up for ASP.Net is the one that says it's "been explicitly forbidden")