host MVC app inside a website
Posted
by Nishant
on Stack Overflow
See other posts from Stack Overflow
or by Nishant
Published on 2010-06-08T11:33:24Z
Indexed on
2010/06/10
8:02 UTC
Read the original article
Hit count: 302
I have a website (not a web application- in visual studio you get two options-create a website/project) running on IIS 6.0. Now I want to develop few features in MVC architecture. So I created one MVC application in visual studio and everything is working fine on localhost as a separate application. Now I want to host this MVC app also inside the website I have already deployed.
I created a virtual directory(MVCDir) inside the default website in IIS 6.0. The global.asax file which was in root folder I added the routing function-
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.Ignore("{resource}.axd/{*pathInfo}")
routes.Ignore("{resource}.aspx/{*pathInfo}")
routes.MapPageRoute("Default4", "{controller}/{action}/{id}", "~/MVCDir", False, New RouteValueDictionary(New With {.controller = "Home", .action = "Index", .id = Mvc.UrlParameter.Optional}))
End Sub
* NOTE- If I write routes.ignoreRoute instead of routes,ignore it says- IgnoreRoute is not a member of System.Web.RoutingCollection*
I called this routing function inside application_start function now when I run domain.com/home/index
How to solve this problem? it says resource not found
© Stack Overflow or respective owner