Routing does not work in MVC4


In this article we will explore some of the updates and configuration required on Windows 7 operating system in case the Routing does not work in MVC4 that is if the routing is not supported in your application.

In this article we will explore some of the updates and configuration required in case the Routing does not work in MVC4.

If your application is running on Windows 7 operating system, Make sure that your operating system is updated with latest Service Pack. This will update the IIS installed on your system.

If the above update does not work. In the web.config file of your application make sure that runAllManagedModulesForAllRequests is set to true as shown below:


<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
...
</modules>
</system.webServer>
</configuration>



runAllManagedModulesForAllRequests="true" in your web.config file allows routing to be supported in your application even though there is no extension such as .mvc or .aspx in your url.

If the IIS is already updated then above setting is not required in web.config file because it adds overhead while processing the request.


Article by Vaishali Jain
Miss. Jain Microsoft Certified Technology Specialist in .Net(Windows and Web Based application development)

Follow Vaishali Jain or read 127 articles authored by Vaishali Jain

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: