Asp.net mvc route collided with physical path in IIS7

I was busy with organizing the controller and I ran into a problem.

If I have the following physical structure

/Home/HomeController.cs
/Home/Index.aspx
/Home/About.aspx

and I request a URI:

/Home/Index

I get 403 Directory Listing Denied: (

(im using custom IControllerFactory and IViewEngine to view this path other than the default)

Why is this happening? (I know that 403 is because it ends up in a folder /Home, but why does it end up in a folder?)

Why does the UrlRoutingModule module not rewrite the route and prevent the controller from receiving a request?

Application_BeginRequest fired, but then it looks like it returns IIS control to try and execute from the file system.

Is UrlRoutingModule the default physical path if it exists before overwriting?

?

N.B. , .. , , ;)

IIS7

+3
2

, .

, .

- , "", RouteExistingFiles RouteCollection.

+4

, . , .

, / , MVC, ? , / .

+1

Source: https://habr.com/ru/post/1746376/


All Articles