Can't find the index pointer when deploying to production?
I am having a problem while trying to deploy an MVC application as a sub-application of an existing ASP.NET 3.5 (not MVC) application. Mistake:
The view 'index' or its master could not be found. The following locations were searched: ~ / Views / employment / index.aspx ~ / Views / employment / index.ascx ~ / Views / Shared / index.aspx ~ / Views / Shared / index.ascx
The app works great when running inside a Visual Studio Express SP1 web developer, and also works when configured as a top-level website.
I am developing under XP (IIS 6ish), so I have already set up wildcard mappings etc. The MVC app is configured as a virtual folder directly below the root website ( http://localhost/ROHAS
where ROHAS is the virtual folder pointing to my MVC solution). I also tried adding routes to global.asax.cs to offset the virtual path of the sub-application:
routes.MapRoute("NetPortal", // Route name<br>
"localhost/rohas/{controller}/{action}/{id}");
and
routes.MapRoute("NetPortal", // Route name<br>
"rohas/{controller}/{action}/{id}");
I even tried adding another virtual folder that just points to the Views folder in my MVC solution.
However, I am still getting the error described above.
You need to create a virtual directory on the website you're using an MVC project in, named "Views", which points to the "Views" directory in your MVC project. Make sure to just create a VD with only "Read" access in IIS Manager and make sure you don't have an application for the VD.
(VD -> Properties -> Make sure the application section is greyed out)
source to share
It looks like your view file is missing. Your jobController is trying to return a view / partial view named index.aspx / index.ascx that cannot be found. You should place your view in the ~ / Views / jobs folder of your mvc.net application directory. Or it can be placed in ~ / Views / Shared / folder
The error is not related to your routing in the global.ascx file
source to share