Answered by:
Run multiple websites on IIS 7

Question
-
User-1213262409 posted
Hello all,
I'm trying to running different ASP.NET 4 website on a new Windows Server 2008 R2 machine
(where I'm not administrator), but only one website works.
If I make a Ping for another website, this respond showing me a different IP address
(not the IP address of the same server).
How can I modify/check this strange behaviour?Thanks in advance.
Luis
Thursday, January 22, 2015 6:25 AM
Answers
-
User753101303 posted
Hi,
The server could have multiple IP addresses, one address being used for each web site. You can use host header names to serve all sites using a single IP. A forum such as http://forums.iis.net/ might be better. You don't have an IIS Admin that could help?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 7:26 AM -
User-760709272 posted
Do BC-site1 and BC-site2 resolve correctly if you ping them? ie
ping BC-site1
ping BC-site2
they should both come back 10.165.8.234
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 8:48 AM -
User1508394307 posted
It seems that DNS record for site2 is pointed to a different server. So any change on IIS for site2 will not be "visible" until domain for site2 is not pointed to that server. Contact your DNS/domain manager to ensure how it is configured.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 8:58 AM -
User-760709272 posted
It's a network config issue then, you need to find out why your hostname is resolving to the wrong address. You can override this locally on your own machine for testing, but ultimately you need your DNS fixed. I note that when you ping BC-site1 it responds as BC-site2?
Anyway, to override DNS locally, open notepad as an admin, edit
c:\windows\system32\drivers\etc\hosts
add two lines at the bottom
10.165.8.234 BC-site1
10.165.8.234 BC-site2
then save the file and try again.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 9:00 AM -
User-760709272 posted
Is the ".it" just something you've been missing up til now for brevity? The hostname in the hosts file has to exactly match the hostname in IIS and the "domain" you put on the browser url. You need the ".it" on all of them.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 10:40 AM
All replies
-
User-760709272 posted
Have you configured the site properly? Setup the DNS records? Without knowing what steps you have done to configure the second site it is impossible to say what the problem might be. Google for how to create a website in IIS7 and you'll find step by step guides to setting up sites.
Thursday, January 22, 2015 6:56 AM -
User753101303 posted
Hi,
The server could have multiple IP addresses, one address being used for each web site. You can use host header names to serve all sites using a single IP. A forum such as http://forums.iis.net/ might be better. You don't have an IIS Admin that could help?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 7:26 AM -
User-1213262409 posted
I've not configured any DNS, but use only IIS to create Web Site (pointing to the correct aspx folders).
In this way:Type = Http
Host Name = BC-site1
IP Address = 10.165.8.234
Port = 80
Type = Http
Host Name = BC-site2
IP Address = 10.165.8.234
Port = 80Only site1 works, and site2 shows anything.
Using ping to this site shows a different IP address (the old server, not running anymore).Thursday, January 22, 2015 8:30 AM -
User-760709272 posted
Do BC-site1 and BC-site2 resolve correctly if you ping them? ie
ping BC-site1
ping BC-site2
they should both come back 10.165.8.234
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 8:48 AM -
User-1213262409 posted
If I make a ping for site2, it returns me:
ping BC-site2
Pinging BC-site2 [10.165.255.143] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.Ping statistics for 10.165.255.143:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Instead BC-site1 returns correctly:Pinging BC-site2 [10.165.8.234] with 32 bytes of data:
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128Ping statistics for 10.165.8.234:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0msNote that site2 returns an IP that is not correctly, but belongs
to the old server (not in Lan anymore).L
Thursday, January 22, 2015 8:54 AM -
User1508394307 posted
It seems that DNS record for site2 is pointed to a different server. So any change on IIS for site2 will not be "visible" until domain for site2 is not pointed to that server. Contact your DNS/domain manager to ensure how it is configured.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 8:58 AM -
User-760709272 posted
It's a network config issue then, you need to find out why your hostname is resolving to the wrong address. You can override this locally on your own machine for testing, but ultimately you need your DNS fixed. I note that when you ping BC-site1 it responds as BC-site2?
Anyway, to override DNS locally, open notepad as an admin, edit
c:\windows\system32\drivers\etc\hosts
add two lines at the bottom
10.165.8.234 BC-site1
10.165.8.234 BC-site2
then save the file and try again.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 9:00 AM -
User-1213262409 posted
Sorry, error of Copy&Paste. Ping to BC-site1 responds with BC-site1 (not BC-site2).
I'll try with file hosts (I'll let you know).L
Thursday, January 22, 2015 9:06 AM -
User-1213262409 posted
Now the ping to site2 is correct:
Pinging BC-site2 [10.165.8.234] with 32 bytes of data:
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128Ping statistics for 10.165.8.234:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
but if I go in:IIS -> (right click on site2) Manage Web Site -> Browse
it responds:
This page can’t be displayed•Make sure the web address BC-site2.it is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.L
Thursday, January 22, 2015 9:22 AM -
User-1213262409 posted
Nothing changes unfortunately.
L
Thursday, January 22, 2015 10:05 AM -
User-760709272 posted
Is the ".it" just something you've been missing up til now for brevity? The hostname in the hosts file has to exactly match the hostname in IIS and the "domain" you put on the browser url. You need the ".it" on all of them.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, January 22, 2015 10:40 AM -
User-1213262409 posted
Sorry, this is my file hosts:
10.165.8.234 BC-site1.it
10.165.8.234 BC-site2.it
The Host name (under site bindings) is:
BC-site2.it
and the name of the site is:BC-site2.it
This is the ping of the site:Pinging BC-site2.it [10.165.8.234] with 32 bytes of data:
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128
Reply from 10.165.8.234: bytes=32 time<1ms TTL=128Ping statistics for 10.165.8.234:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0msBut, until now, the web site does not start.
Luis
Friday, January 23, 2015 3:40 AM -
User753101303 posted
does not startHi, see Windows events and other logs on the server side to get something more accurate about why it doesn't work. An IIS forum might be better. Note that changing localhost is fine for a test but you have to get someone changing the DNS so that it points to the new server rather than to the old server. You may have also firewall etc... coming into play. Can't you get some support from someone that gets the big picture. You'll need anyway someone that knows how to change the DNS.
A forum at http://forums.iis.net/ might be better
Friday, January 23, 2015 4:21 AM -
User-1213262409 posted
Ok Patrice, I'll try in that forum.
Thanks a lot to you and Aidy for your help until now.Luis
Friday, January 23, 2015 4:41 AM