However the way our application is setup we have many websites we maintain. So we created one Website in IIS and add applications to it.
To access these websites the url is http://localhost/Websitename
However the default document on these websites do not work. When you hit http://localhost/Websitename you get a 404. But if you do http://localhost/Websitename/default.aspx you get the page. So it appears that the Default document is not inheriting correctly.
Any ideas on what to do?
I am having the same issue w/ IIS8. I have removed all default documents except for default.asp both at the server and default web site level. There is only one site on the server and it is the default website. Static content is installed in IIS as well
(as suggested above.)
My site's web.config default document section is as follows:
I know this is an old thread, but it is the exact problem i cannot seem to resolve. I have multiple sites running on multiple servers and default document has never caused an issue for me, but for some reason with this IIS8 server install it is not working.
6 Posts
Default Document Problem
Feb 11, 2009 01:45 PM|Cstolworthy|LINK
So I have spent quite a bit of time trying to find a resolution to my problem. In my Web.config I do have a default document set
<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
<add value="iisstart.htm" />
</files>
</defaultDocument>
However the way our application is setup we have many websites we maintain. So we created one Website in IIS and add applications to it.
To access these websites the url is http://localhost/Websitename
However the default document on these websites do not work. When you hit http://localhost/Websitename you get a 404. But if you do http://localhost/Websitename/default.aspx you get the page. So it appears that the Default document is not inheriting correctly. Any ideas on what to do?
2343 Posts
Microsoft
Re: Default Document Problem
Feb 11, 2009 02:18 PM|anilr|LINK
What is the output of
%windir%\system32\inetsrv\appcmd.exe list config http://localhost/websitename -section:defaultDocument
Also, I assume you have installed the "Static content" feature under IIS which includes the default document feature.
Software Design Engineer
IIS Core Server
6 Posts
Re: Default Document Problem
Feb 11, 2009 04:15 PM|Cstolworthy|LINK
The output is the exact same as the section I posted before. I am not sure what you mean by the "Static Content" feature. Where can I check this?
6 Posts
Re: Default Document Problem
Feb 12, 2009 04:53 PM|Cstolworthy|LINK
I checked in the add/remove windows components and I do have static content installed for IIS
2343 Posts
Microsoft
Re: Default Document Problem
Feb 16, 2009 12:34 PM|anilr|LINK
Can you collect failed request tracing for the request - you can e-mail it to me at anil (dot) ruia (at) microsoft (dot) com
Software Design Engineer
IIS Core Server
7019 Posts
MVP
Re: Default Document Problem
Feb 17, 2009 04:20 AM|qbernard|LINK
Bernard Cheah
6 Posts
Re: Default Document Problem
Feb 25, 2009 10:05 AM|Cstolworthy|LINK
I didn't see a sub code in the tracing logs. Just a 404.
6 Posts
Re: Default Document Problem
Feb 26, 2009 03:47 PM|Cstolworthy|LINK
Thanks to Anil this problem has been fixed. I had an old value in my web.config that was halting the default document.
7019 Posts
MVP
Re: Default Document Problem
Feb 27, 2009 11:19 PM|qbernard|LINK
err. thought you have a <clear /> instruction in the config file?
Bernard Cheah
5 Posts
Re: Default Document Problem
Jul 24, 2013 03:46 PM|dza|LINK
Hello,
I am having the same issue w/ IIS8. I have removed all default documents except for default.asp both at the server and default web site level. There is only one site on the server and it is the default website. Static content is installed in IIS as well (as suggested above.)
My site's web.config default document section is as follows:
<defaultDocument enabled="true">
<files>
<remove value="default.asp" />
<add value="default.asp" />
</files>
</defaultDocument>
I am getting a 404 error when the http://sitename is called, but the page is fine when http://sitename/default.asp is called.
I know this is an old thread, but it is the exact problem i cannot seem to resolve. I have multiple sites running on multiple servers and default document has never caused an issue for me, but for some reason with this IIS8 server install it is not working.
Thanks in advance for your suggestions.
defaultdocument iis8