Routing in MVC application- Forcing route to go to MVC route rather than physical web form folder

59 Views Asked by At

I have solution with co-existing MVC and Web forms. I have a folder called New in my UI project with page as default.aspx.

By default mydomain/New lands me to tohis default.aspx page. Now i want to land it to MVC controller i have created.

New controller is: NewController and i want route all request like mydomain/New should land to this controller ignoring the physical file present in my project.

How can i do this?

1

There are 1 best solutions below

1
NightOwl888 On

Delete the physical page and folder. IIS won't send the request to MVC unless the physical path doesn't exist.