开发者

Why is the w3wp.exe process looking on file system when an ASP.NET MVC controller is accessed?

Was just wondering if this was normal behavior as I'm fairly new to ASP.NET MVC. When I monitor the site usa开发者_运维技巧ge via procmon I see the following:

7:19:17.0053886 PM w3wp.exe 3992 QueryOpen C:\www\inetpub\ControllerName.mvc\ActionName PATH NOT FOUND

(This site is setup to run on IIS6/MVC2 - the reason for the .mvc extention)

This is happening when the ControllName.mvc\ActionName URL is hit.


the .mvc extension is mapped to the ASP.NET runtime which processes the request using ASP.NET MVC engine. It does the following:

  1. Starts the routing engine.
  2. The "router" looks if the file in the request exists on the file system. If yes, it returns it to IIS which will render the static file.
  3. If it does not exist, the ASP.NET routing executes appropriate actions.

So your log is the result of step 2 here. It is normally should not be performed.

I know one reason why it runs though: you have RouteExistingFiles set to true. You need to check it to be set to false (which is the default).


One more observation is that w2wp looks for file in the root of inetpub, which means the application is located in the Root of the web site and not in the Virtual Directory. If it is not true, then you should check the location of the application on disk and structure of the web site. Maybe there is just some collision.


Have you unticked the "Verify that file exists" box in IIS?

It's in the properties of the Website -> Home Directory -> Configuration -> Wildcard Application maps -> your existing aspnet map

Unfortunately, the screenshot on the Microsoft page has the box ticked while the text says "Uncheck the checkbox labeled Verify that file exists"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜