Using IIS 7 how do I configure a website to be available at a specific url?
If I create a directory with an index.html file in, and create a website using that directory, the website's url is 'http://localhost', how do I get it to be served at 'http://localhost/Application1' instead?
I've spent an hour scouring the web looking for solutions for what appears to be the most obvious configuration imaginable. I've seen two possible approaches.
Create a virtual directory with the desired url that is configured to address a physical directory that serves no purpose and then create the applciation as a child of that directory. Tried it, IIS just complained that the location couldn't be found.
Install some sort of url rewriting module and then decide whether I want to spend the next hour or so working out how to configure it or just kill myself instead.
There must be a more straightforward solution surely??
UPDATE
I've noticed something else that doesn't make any sense. If I create a new website inetpub/wwwroot2 and under that create two applications App1 and App2, (each directory containng a simple static index.html). In IIS Manager if I attempt to create a virtual directory using App1 or App2 and click 'Test Settings' there is an Authorization error that states:
"The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again."
After more rummaging around on the web I discovered a solution for this, which I'll post as a possible answer.