Solution to MVC app listing contents of directory instead of executing routes
1 min read
I just deployed a new MVC web app and instead of executing the routes it just listed the contents of the directory like so:

There could be many reasons for this, but I figured out the reason it was happening for me was that my AppPool was set to Classic instead of Integrated.

Change your mode to Integrated and it should work.
Jon
Share:
Share on LinkedIn
Quick Share: Your custom post text has been copied to your clipboard! Click the button below to open LinkedIn's share dialog, then paste it.
💡 Tip: LinkedIn will open in a new tab. Use Ctrl+V (or Cmd+V on Mac) to paste your text.
Note: LinkedIn will show the article preview. You can add your custom text above it.