• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

Combine MVC and .Net 4 Web Forms Routing

We are currently implementing some new functionality into our existing website which runs on a CMS that is .Net 4.

The CMS has it's own .Net 4 routing for it's user friendly URL's implemented through the CMS and also has a developer framework which allows us to create our own custom functionality.

We are creating this custom functionality on the MVC 3 framework using MVC routing.

I can successfully implement MVC routing if i have the .Net 4 routing turned off, but when i try and run them both together the MVC routing fails because the .Net 4 routing tries to implement it first (the .Net 4 one needs to run first because the code doing it does some other application related things on application start).

How can i get the call to the .Net 4 routing to ignore MVC routes?
  • 2
1 Solution
Unfortunately, you can't have both routing scenarios set up simultaneously. Your best bet would be to either have a folder exclusion rule in the CMS routing and put all your content under that folder and have it handled in MVC, but I'm not even sure if that would work the way you want.

The other option would be to create a subdomain or separate application for the MVC site.
Sammy AgeilCommented:
In the global.ascx of the Webforms add this to where you register your routes.
I think the method is called RegisterRoutes

Sammy AgeilCommented:
oops that was supposed to  be


Open in new window


Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now