KlimczakM KlimczakM -4 years ago 128
ASP.NET (C#) Question

IIS - can't access page by ip address instead of localhost



I'm trying to publish

ClickOnce
application and test it locally. I have to provide installation folder and update location with an IP adress, unless I won't be able to install it (because
localhost
is translated into computer name and it's not accessible). The problem is, that on my IIS I can access my page only by using
localhost
in address.


http://localhost:9995/publish/Publish.htm <-- working
http://192.168.1.104:9995/publish/Publish.htm <-- not working (my IP address)
http://my_pc_name:9995/publish/Publish.htm <-- not working
http://127.0.0.1:9995/publish/Publish.htm <-- even that is not working


I'm using
Windows 7
and
Visual Studio 2012
with
IIS Express 8.0
, but I tried the same on
Visual Studio 2010
and it's
ASP.NET server
and still failed. I have my firewall turned off.

Do you have any ides what can be wrong? I would be very thankful for any help.

Answer Source

The IIS is a multi web site server. The way is distinct the site is by the host header name. So you need to setup that on your web site.

Here is the steps that you need to follow:

How To Use Host Header Names to Configure Multiple Web Sites

HOW TO: Use Host Header Names to Host Multiple Sites Using Host Header Names to Host Multiple Web Sites

In general, open your web site properties, locate the Ip Address and near its there is the advanced, "multiple identities for this web site". There you need ether to add all income to this site with a star: "*", ether place the names you like to work with.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download