質問

I am trying to access a path in my MVC controller, and have the correct routes established. However there is a path I'm accessing http://localhost:11541/Controller and am getting the error

You don't have permission to list files in this directory.

I can only assume that there is a folder or file with the same name that IIS is "seeing" before MVC routes take the path. I want to inspect this path to make sure it's empty before I continue.

役に立ちましたか?

解決

IIS Express hosts directly out of your project directory. There's no special place that it moves your code to. You'll generally only see that error when where's a folder that matches your URL path, but no actual route that matches. Without more information such as your project directory structure and the contents of your RouteConfig.cs, it's impossible to say exactly what's happening, though.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top