Default - Default setup IIS

Discussion in 'Visual Studio' started by ronhawker, Jun 5, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Interesting experience with defaults between IIS and Visual Studio. We were setting up a new sub-domain and wanting to redirect to a subfolder. Standard stuff. Set the A DNS record to the base ip and then setup the global.aspx redirect to the subdirectory. That works fine. Now we setup a default.aspx landing page in Visual Studio under the sub folder. Used the base setting of stating the folder only in the redirect in Global.aspx. Should pick up the default.aspx as the folder start page. Getting a blank page. But getting a blank page that wasn't the default.aspx page in the folder root. We spent most of the day chasing our tail as why was the redirect which seems to work not pulling up the default.aspx page that we had but instead pulling up a blank page with just a header and body tags.

    To make a long story short, IIS was looking for index.aspx as when we renamed the default.aspx to index.aspx it loaded and rendered fine.

    Interesting mis-match between IIS setup and Visual Studio setup. Visual Studio by default creates a default.aspx as a new page if you don't change the name. On the other hand I believe that IIS defaults to index.aspx as the default root name. Not sure that is correct but seems to be setup that way here and I have seen it before in another host site.

    I know that you can change both to different default settings and actually setup IIS to look for both. But the way, the way it is working now is that when the server did not find an index.aspx it did not seem to look for the default.aspx alternative but actually render some sort of blank page instead of giving a 404. That really caused us to chase our tails as it was actually loading and rendering a page but we could not figure out where it was coming from.

    This just seems odd that IIS and Visual Studio would offer different default page names, AND then offer up some blank alternative if it did not find the default page.

    Just passing it along...
     
  2. Hi,
    We should probably do a Webcast on this sort of thing, it does come up now and then.
    The cool thing about this is you have full control over it in your DASP Control Panel.
    This allows for a Developer to have a root default.aspx file but if for example they do not want a sub-folder to resolve for an annonymous person they can create their own index file and use it as needed, or you can have both and allow for "default" checks and balances.
    However you want to cook it up DASP servers give you room to play as you see fit. ;-)
    All the best,
    Mark
     
  3. Odd, by default IIS should have index.aspx and default.aspx as one of the startup pages. The order or precedence should be index.htm, index.html, index.asp, index.aspx, default.htm, default.html, default.asp, and default.aspx.

    If it does not find index.aspx it should go down the list and serve up default.aspx.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page