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.