IIS如何处理ASP.net MVC请求?

时间:2021-05-18 03:34:38

I have a confusion over ASP.net MVC request handled by IIS. As every body says it built on top of ASP.net Engine. So only Url routing module and MvcRouteHandler makes a difference and they handled the request appropriately. I understand this.

我对IIS处理的ASP.net MVC请求感到困惑。正如每个机构都说它建立在ASP.net引擎之上。因此,只有Url路由模块和MvcRouteHandler有所不同,他们会适当地处理请求。我理解这一点。

But My Question is how IIS understand that it is MVC request . There is no extension like .aspx is given in url . So how does it maps to correct ISAPI DLL.

但我的问题是IIS如何理解它是MVC请求。在网址中没有像.aspx这样的扩展名。那么它如何映射到正确的ISAPI DLL。

I appreciate your help to clear my confusion.

感谢您的帮助以消除我的困惑。

1 个解决方案

#1


4  

These rules can be defined at any level in IIS. Most MVC applications define the handlers at the application level in the web.config file:

可以在IIS中的任何级别定义这些规则。大多数MVC应用程序在web.config文件中定义应用程序级别的处理程序:

<system.webServer>        
    <handlers>
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit".../>
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit".../>
      <add name="ExtensionlessUrlHandler-Integrated-4.0".../>
    </handlers>
</system.webServer>

#1


4  

These rules can be defined at any level in IIS. Most MVC applications define the handlers at the application level in the web.config file:

可以在IIS中的任何级别定义这些规则。大多数MVC应用程序在web.config文件中定义应用程序级别的处理程序:

<system.webServer>        
    <handlers>
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit".../>
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit".../>
      <add name="ExtensionlessUrlHandler-Integrated-4.0".../>
    </handlers>
</system.webServer>