1

I am trying to set up a site that needs to be accessed by users on my local network only with IIS Express (latest version), I am able to access it through the URL http://timesheet:8080, however, none of the other networked machines are able to access it through this URL.

The <sites> section in the applicationhost.config files reads as follows:

        <sites>
        <site name="Final Time Planning" id="1">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="T:\Public$\Temp\Charlie\Web\Final Time Planning" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:8080:timesheet" />
            </bindings>
        </site>

        <siteDefaults>
            <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
            <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
        </siteDefaults>
        <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
        <virtualDirectoryDefaults allowSubDirConfig="true" />
    </sites>

I have also added 'timesheet' in my hosts file with the local ip of 127.0.0.1.

What am I doing wrong? Any suggestions greatly appreciated. If you need any more info feel free to ask.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Charlie
  • 197
  • 4
  • 15
  • What version of Windows are you using? And what is the name of the PC? Is it actually called `timesheets`? – RB. Sep 20 '12 at 14:17
  • Windows XP Pro 32 bit running SP3 – Charlie Sep 20 '12 at 14:24
  • That I should have included in the question, the machine's name is not 'timesheet', I know a few resources I've read have said to put your machine name, but does it absolutely have to be that for it to work? – Charlie Sep 20 '12 at 14:25
  • When a client wants to connect to a particular server, it has to be able to convert that server's hostname (e.g. `timesheet`) to an ip address. It can do this through DNS, or looking up an entry in a hosts file, but it needs a way. Your machine's hostname is already registered with your networks DNS server, which is why using that instead of `timesheets` will work automatically. Given your comments to my answer, I would suggest that your best fix is to use your machine-name, not timesheets - see my edit. – RB. Sep 20 '12 at 14:30

1 Answers1

3

You say:

I have also added 'timesheet' in my hosts file with the local ip of 127.0.0.1.

Have you added a line to the hosts files of all the computers attempting to access your site, pointing to your PCs IP address?

Also, you may need to enable remote requests

EDIT Given your lack of access to hosts files/DNS configuration, I think your best bet would be to configure IIS Express to listen on any host name. Then, someone can access it either as http://yourmachinename:8080/ or http://timesheets:8080/ depending on if they can resolve timesheets.

Change your bindingInformation attribute to

bindingInformation="*:8080:"
Community
  • 1
  • 1
RB.
  • 36,301
  • 12
  • 91
  • 131
  • Surely that's not necessary? What if for example one of the users of the website was using an iPad, I can't imagine system files like that would be easily accessible... – Charlie Sep 20 '12 at 14:17
  • @Charlie What you *actually* need to do is to add an entry mapping `timesheets` to your IP address in your DNS server. I only mentioned hosts files because you had... – RB. Sep 20 '12 at 14:20
  • I see, I'm in a workplace and I don't think I have access to the router and DNS server configuration, will check with the server admin. In reply to the remote requests, the 'httpcfg' command is not recognised through command line, when I tried to download the XP support tools it says the genuine Windows check is out of date... which is real helpful... :p so it disallows me access to the download. – Charlie Sep 20 '12 at 14:30
  • If I change the bindinginformation to "*:8080:", what URL would I type to access the site then? Would it be the machine name? – Charlie Sep 20 '12 at 14:36
  • @Charlie You can use **any** hostname that will resolve to your server's IP. In practice, on **your machine** it is `http://localhost:8080`, `http://timesheets:8080`, and `http://[yourmachinename]:8080`. For **other machines** it is `http://[yourmachinename]:8080` only (unless you can edit their hosts file or create a DNS entry). – RB. Sep 20 '12 at 14:39
  • Awesome, that worked, thank you so much. Will attempt to create a DNS entry to modify the URL, will mark as answer, cheers again. – Charlie Sep 20 '12 at 14:53