asp.netasp.net-mvcweb-applicationsintegration

How to Integrate ASP.Net Webforms website with an ASP.Net MVC web application?


How would I run both of them under one main website, say www.example.com, which is written and deployed using a Visual Studio ASP.Net MVC web application project, and where an ASP.Net Web Forms website, would run from a subdirectory of the main site, say www.example.com/myapp?


Solution

  • See Hanselman's blog post. The basic idea is that you add a regular WebForm to your MVC project, then tell the routing engine to ignore that path when doing MVC routing.