1

I am new to the web world, so I apologize if this question is silly.

I have an ASP.NET web site I wish to deploy. The server has IIS 7 deployed on it, and I've added the site to that IIS server as a web site.

For the time being I don't have a domain mapped to the site, I would like the users to browse for the site directly by using the server's IP. Is that even possible? because I failed to do it. The only option that worked so far is using the hosts file to declare a fake domain.

It would be nice if someone could clarify that issue for me.

Thanks a lot,

Omer

2
  • 1
    All a domain name does is map to the IP address of the server (along with add a host name header, technically), so yes it's definitely possible to access a website with just an IP address. What address did you use? Is anything blocked by a router or firewall? Is the IIS site configured to only respond to requests for that domain instead of all requests?
    – David
    Jun 17, 2013 at 14:10
  • I gave the site a name, and when I tried browsing it through the IIS on port 80, the browser failed to find the site. unless I've mapped that name in the hosts file. So I don't think this is firewall issue, more of a lack of understanding on my part. Jun 17, 2013 at 14:16

3 Answers 3

2

If you set the site bindings to IP address: All Unassigned on port 80, and do not provide a host name, then any request that makes it through to IIS should be served by that site. Make sure you stop any other sites that might have that binding (e.g., "Default Web Site" is normally bound to this).

2
  • There are other web sites on that server, I don't wish to disable them. just to add another site. the other sites are just WCF listeners under the default web site so they work fine. Jun 17, 2013 at 14:18
  • 1
    @omerschleifer Are those accessed by host name, or are they also accessed by IP address? If they are accessed by host name, you can change the bindings on Default Web Site to only be bound to that name. (And then probably change the site's name to avoid confusion.) If they are also accessed by IP address, then you'd have to do this by creating separate applications within the one site.
    – Ryan M
    Jun 17, 2013 at 14:34
1

In order to access the site by IP, you can't have the host name populated in IIS. Your best bet would be to use the "Default Web Site" that's already in IIS, and point that to your application.

2
  • In that case I should add the site as a web application, right? Jun 17, 2013 at 14:13
  • You can do that, or you can actually use the root website itself as an application, assuming you don't have anything else that would conflict.
    – Joe Enos
    Jun 17, 2013 at 14:15
0

Using IP is possible, but you need to make sure your users can see this ip from their machines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.