« Previous Next »

Answered Thread: IIS 7 Cannot find Default.aspx

Last post 11-09-2009 3:17 AM by Leo Tang - MSFT. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 11-03-2009, 1:20 PM

    IIS 7 Cannot find Default.aspx

    I have a .NET web app that is being served in IIS7.  In this web app ,there are a few different pages named default.aspx that live in some of the subdirectories of the site(one default.aspx for each subdirectory). The developer before me somehow rigged it so when a hyperlinklcontrol is clicked, it will reference only the subdirectory and not the default.aspx  page within the subdirectory. (So on the hyperlink click there is a Respones.Redirect that points to "../subdirectory/")
    On our production system (IIS 6) ,same web app,somehow IIS knows how to find  the default.aspx of the subdirectory.  Problem is I cannot achieve the same behavior on my local machine that uses IIS7.  I am assuming IIS is where the issue lies but I am not 100% certain. I also went into the ASP settings in the features view and set "Enable Parent Paths" set to true.But I still get a 404 error with it saying it cannot find the default.aspx. It is there however.
     Attached is code from the web.config which I  believe helps achieve the desired behavior. This web app actually lives in a Virtual Directory under the Default Website .If anyone has any suggestions as to how to remedy I would be very appreciative.

    Thanks
    Jason

     

    <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <defaultDocument>
    <files>
    <clear />
    <add value="default_loc.aspx" />
    <add value="default.aspx" />
    </files>
    </defaultDocument>
    <modules xmlns="">
    </modules>
    <directoryBrowse enabled="true" />
    </system.webServer>
    

     

     

  • 11-05-2009, 10:30 AM In reply to

    Re: IIS 7 Cannot find Default.aspx

    Might be a silly question, but did you set the default document for the site to Default.aspx in IIS and is it the only, or the top, document in the list?

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 11-09-2009, 3:17 AM In reply to

    Answered Re: IIS 7 Cannot find Default.aspx

    Hi, 

    Jazzcatone:
    <directoryBrowse enabled="true" /> </system.webServer>
    Since the directory browse is enabled, it will browsing the directory instead of return the default page.

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (3 items)
Microsoft Communities