Hello Chuck,
Did you get to end of this issue?
Please feel free to reply me if you want to get more help for this problem.
---
Sincerely,
Jerry Weng
Microsoft Online Community Support
--------------------
| X-Tomcat-ID: 1219927
| References: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Jerry Weng)
| Organization: Microsoft
| Date: Mon, 26 Jul 2010 02:57:17 GMT
| Subject: RE: default webpage with iis7 and web.config
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 105
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.dotnet.framework.aspnet:1618
| NNTP-Posting-Host: tk2tomimport1.phx.gbl 10.230.18.247
|
| Hello Chuck,
| Thank you for posting.
| From your post, my understanding on this issue is: the defaultDocument
| setting in IIS did not work for subdirectory. If I'm off base, please
feel
| free to let me know.
|
| Yes, we can add a default document in the subdirectory.
|
| By default, default documents are enabled, and IIS 7 defines the
following
| default document files in the ApplicationHost.config file as server-wide
| defaults:
|
| Default.htm
| Default.asp
| Index.htm
| Index.html
| Iisstart.htm
|
| By default, when a request arrives for our site's or application's root
| directory, IIS attempts to return the correct files in the order that
they
| appear in the <defaultDocument> element. If the Default.htm file exists,
| IIS sends it to the client browser. If the Default.htm file does not
exist,
| IIS attempts to send the Default.asp file to the browser. IIS continues
in
| this manner until it attempts to send each default document file to the
| client browser.
|
| If we add a web.config in the subdirectory and configure the default
| document like what you did, the list of the default documents in that
| subdirectory will be like this:
|
| Diagnostics.aspx
| Default.htm
| Default.asp
| Index.htm
| Index.html
| Iisstart.htm
|
| So I think it should work for the subdirectory. And I tested it with my
| IIS, it proved to work fine.
|
| For your issue, maybe you can try to add a <clear /> in the
| <defaultDocument> schema to clear the default settings in the parent
| configuration file.
|
| <system.webServer>
| <defaultDocument>
| <files>
| <clear />
| <add value="Diagnostics.aspx" />
| </files>
| </defaultDocument>
| </system.webServer>
|
| If this could not make a workaround, please tell me more about the issue?
| Which page did you see after you set the default doucment in the
| subdirectory? Or you saw an error page?
|
| Here is a reference document:
| Default Document <defaultDocument>
|
http://www.iis.net/ConfigReference/system.webServer/defaultDocument
|
| Please let me know the information above so that I can provider further
| assistance on this problem. I am looking forward to your reply.
|
| --
| Sincerely,
| Jerry Weng
| Microsoft Online Community Support
|
| ==================================================
| Get notification to my posts through email? Please refer to
|
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
| ications.
|
| With newsgroups, MSDN subscribers enjoy unlimited, free support as
opposed
| to the limited number of phone-based technical support incidents. Complex
| issues or server-down situations are not recommended for the newsgroups.
| Issues of this nature are best handled working with a Microsoft Support
| Engineer using one of your phone-based incidents.
| ==================================================
|
| --------------------
| | Thread-Topic: default webpage with iis7 and web.config
| | thread-index: AcsqrgAX7DubtyCiSout/AIst2ZOwQ==
| | X-WBNR-Posting-Host: 192.12.184.2
| | From: Chuck <
[email protected]>
| | Subject: default webpage with iis7 and web.config
| | Date: Fri, 23 Jul 2010 14:28:32 -0700
| | Lines: 13
| | Message-ID: <
[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | Path: TK2MSFTNGHUB02.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:1609
| | NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Can I set a default webpage for a subdirectory within a website.
| | In a subdirectory I tried using
| |
| | <system.webServer>
| | <defaultDocument>
| | <files>
| | <add value="Diagnostics.aspx" />
| | </files>
| | </defaultDocument>
| | </system.webServer>
| | This didn't work in the subdirectory.
| |
| | vs2010 iis7
| |
|
|