Link to home
Start Free TrialLog in
Avatar of PiedmontHealth
PiedmontHealth

asked on

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:

-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?
ASKER CERTIFIED SOLUTION
Avatar of Seaton007
Seaton007
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try to set the default  main page from the iis
Avatar of PiedmontHealth
PiedmontHealth

ASKER

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?
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!