I cannot find <modules> about UrlRoutingModule when creating an Asp.net MVC 3 application

I downloaded the MVC 3 source code to find out how it works.

Many have said that MVC intercepts Https requests with the UrlRouting Moudle class.

I know when you configure HttpModule, you need to register it as follows:

<system.webServer> <modules> <add name="test" type="WebApplication2.MyModule1,WebApplication2"/> </modules> </system.webServer> 

So, the asp.net mvc Web.config file. Must have a configuration section:

  <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule,..." /> 

But I can not find it in the web.config file when I create a new ASP.NET MVC application.

Someone said that IIS 7 will automatically add it.

When in IIS7 add a configuration section?

How is the difference IIS7 is an MVC or WebForm application?

+6
source share
1 answer

Ha, you have a few questions. Web.config is at the root of your initial project, when you open it in Visual Studio, otherwise, if you are "exploring" the application in IIS, this should also go into it.

Not all modules are included in the web.config file, some of them are also in the machine.config file. This is usually done in C: \ WINDOWS \ Microsoft.NET \ Framework \\ CONFIG

Hope this helps.

+8
source

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


All Articles