My client has just got a new dedicated server running Win2008 (we had 2003 before), II7, etc. I started setting a little ASP.NET 2.0 web application we have. Running on its own AppPool 2.0.
The problem is that when I browse the site root (locally or remotely), I get 404 because the url now points to http://domain/default.php, when it should be default.aspx.
Yes, I've checked the Defaults Documents settins for the website and I deleted everything but default.aspx (default.php was not even listed).
To finish, I'll say that if I navigate to http://domain/default.aspx, the site works perfectly and I can follow links without problem.
Any idea why is this happening? Or at least where I should start looking?
Thanks!
UPDATE
- I've already tried resetting IIS.
I've checked the web.config looking for some default.php, nothing found. It's the same web.config copied from the old server which has not this problem. In fact, there is default.aspx being explicity declared on the web.config as follow:
<system.webServer> <defaultDocument enabled="true"> <files> <clear /> <add value="default.aspx" /> </files> </defaultDocument> </system.webServer>
- The problem seems to happen only with that website. The default website root resolves well to its default document (iisstart.htm)
Restart the server. Look at web.config
Also have a gander at the configuration files themselves: http://learn.iis.net/page.aspx/122/getting-started-with-iis-70-configuration/
It seems the problem happended when the website hasn't any host-header value set. Now that we've got the domain for the site and add the host-header value to the IIS Website, it now works as expected. Weird though...