Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can’t find the <modules> about UrlRoutingModule When Create a Asp.net MVC 3 Application

I have downloaded the source code of the MVC 3 to learn How it runs .

Many people said that the MVC interceptes Http’s requests by the UrlRouting Moudle Class.

I know when you custom a HttpModule ,you need to register it like that:

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

So Asp.net mvc application Web.config file Should be have the configuration section:

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

But I can't find it int the web.config file,when I create a new Asp.net MVC application .

Someone said the IIS 7 would automatically added it .

When to IIS7 add the configuration section?

How the IIS7 Difference it is a MVC application or WebForm?

like image 839
DotDot Avatar asked Mar 31 '12 08:03

DotDot


1 Answers

you have a few questions in there. The web.config is located in the root of your start up project when you open it in Visual Studio, else if you 'explore' the application within IIS, this should take you to it also.

Not all modules are included in the web.config, some are also in the machine.config. This is usually in C:\WINDOWS\Microsoft.NET\Framework\<version>\CONFIG

Hope that helps.

like image 154
SuperJumbo Avatar answered Sep 23 '22 02:09

SuperJumbo