IIS7.5 Not allowing me to access default page

PiedmontHealth
PiedmontHealth used Ask the Experts™
on
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:

-phc
|--main
|--other folders
|--etc.

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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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:
http://technet.microsoft.com/en-us/library/cc742512.aspx

Here are a few other things to check:
http://stackoverflow.com/questions/6948669/iis-7-not-serving-default-document
http://serverfault.com/questions/231044/iis-7-5-virtual-dirs-with-different-default-documents
Kamal KhaleefaInformation Security Specialist

Commented:
Try to set the default  main page from the iis

Author

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?

Author

Commented:
This article helped lead to a solution:
http://stackoverflow.com/questions/6948669/iis-7-not-serving-default-document

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!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial