1
votes

I don't know if I'm doing something very obvious incorrectly, but for some reason my web app thinks that it's root folder is different to what it actually is.

I have created a web application below Default Web Site. Whenever I have done this in the past, and understanding of how it's supposed to work, is that any requests to the application root (for URL routing, for example ~/index.aspx or for images) have always resolved to [server][applicationname]\index.aspx.

For some reason, whenever I do this with this particular application, instead of going to [server][applicationname]\index.aspx, I'm being redirected to [server]\index.aspx, and for the life of me, and after extensive googling and fiddling with settings, I can't get it to pick up the correct path.

Any suggestions?

2
Can you post a screenshot of the setup in IIS7? - mellamokb
I don't have access to the server that this is on at the moment, but will do when I get a chance. Which settings exactly do you want to see? - Mathew Collins
Can you double check that you have created an application, not just a virtual directory? - Knaģis
@Knaģis If I go to Default Web Site and click view applications then my application is listed there. - Mathew Collins

2 Answers

0
votes

When you go to your site in II7, first make sure your site is highlighted. Then click Basic Settings on the right hand side. Double check the Physical Path in the popup window.

0
votes

Well, I don't know what the problem was, but after restarting the website it seemed to go away and is now working as expected. It's possible that it was caused by the application previously being a web site, and then I converted it to a web app without restarting it, although I did recycle the app pool.

Cheers for the comments - I'll leave this as the answer in case someone has a similar problem in future.