我试图得到一个MVC3应用程序下单的工作,一切都进行得很顺利,直到我部署到我的服务器......单MVC3未能映射路径
目前我得到:
Failed to map path '/projects/_ViewStart.cshtml'
System.InvalidOperationException: Failed to map path '/projects/_ViewStart.cshtml'
at System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir, Boolean allowCrossAppMapping) [0x00000] in <filename unknown>:0
at System.Web.HttpRequest.MapPath (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Hosting.HostingEnvironment.MapPath (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Hosting.DefaultVirtualPathProvider.FileExists (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.WebPages.FileExistenceCache.FileExists (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.WebPages.VirtualPathFactoryManager.PageExistsInVPP (System.String virtualPath, Boolean useCache) [0x00000] in <filename unknown>:0
at System.Web.WebPages.VirtualPathFactoryManager.PageExists (System.String virtualPath, Boolean useCache) [0x00000] in <filename unknown>:0
at System.Web.WebPages.WebPageExecutingBase.FileExists (System.String path, Boolean useCache) [0x00000] in <filename unknown>:0
at System.Web.WebPages.StartPage.GetStartPage (System.Web.WebPages.WebPageRenderingBase page, System.String fileName, IEnumerable`1 supportedExtensions) [0x00000] in <filename unknown>:0
at System.Web.Mvc.RazorView.RenderView (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer, System.Object instance) [0x00000] in <filename unknown>:0
at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func`1 continuation) [0x00000] in <filename unknown>:0
错误。我可以确认所有的文件和DLL的存在,但路径看起来不正确,当然它应该在事情存在的视图文件夹中查找?
是否需要设置某种设置以确保它在正确的Views位置中显示?我也注意到有文件路径前没有“〜”字符...
我看了看周围的净和尝试各种解决方案,但没有一个似乎工作..