• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3614
  • Last Modified:

IIS7.5 Not allowing me to access default page

I have a new web server running IIS7.5 on Windows 2008. Moving stuff from the old server to this new one.

I have a web application called "phc". Under "phc", I have a child folder called "main". The "main" folder is a web application that runs under "phc". Folder structure like so:

|--other folders

Only main is a nested web application. All other folders are just regular folders under "phc". Main has to be nested for everything to work correctly in both applications.

On my old server, I could go to this URL: mysite.com/phc/main and it would land on my default page of the site like so: mysite.com/phc/main/Default.aspx.  

However, when I try the same setup on IIS7.5, going to mysite.com/phc/main takes me to the login page for the "main" app and I land on mysite.com/phc/main/Login.aspx?ReturnUrl=%2fphc%2fmain.

I have read some stuff about default pages not working in IIS7+, but I have tried lots of web.config settings. Any suggestions?
  • 2
1 Solution
There is a setting in IIS to tell it which document you want to be the default.  Make sure default.aspx is in the list and make sure it's at the top.

Here is some more information:

Here are a few other things to check:
Kamal KhaleefaInformation Security SpecialistCommented:
Try to set the default  main page from the iis
PiedmontHealthAuthor Commented:
I tried all of the above before posing the question on this site.

Setting default documents, adding the ExtensionlessUrl section to my web.config, etc.

I am reading a lot about the StaticFile handlers and ExtensionlessUrl, but don't know enough about IIS to go in and make a bunch of changes. Can someone recommend anything in regaard to these two items?
PiedmontHealthAuthor Commented:
This article helped lead to a solution:

The issue is the "extensionless" handlers that were added into IIS7+ and these override the StaticFile handler. The solution was to move the StaticFile handler above the extentionless handlers in the handler execution order. For some reason the web.config modifications that were supposed to remove "Extentionless" handlers would not work, so I did it like this:

1. Opened IIS.
2. Clicked on the application
3. Double clicked on "Handler Mappings"
4. Clicked on "View Ordered List"
5. Found "StaticFile", which was at the bottom of the list.
6. Clicked "StaticFile" and then Move up to move it right above the three handlers that begin with "Extensionless"
7. This modified my "handlers" section of my web.congif, but it solved the issue.

Thanks for helping!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now