我的MVC应用程序面临一个奇怪的问题,一切正常,我不知道现在这个应用程序发生了什么.我只是更新所有的nuget包.得到以下错误
Value cannot be null or empty. Parameter name: contentPath at
错误位置
@System.Web.Optimization.Scripts.Render("~/bundles/modernizr")
@System.Web.Optimization.Scripts.Render("~/bundles/jquery")
我没有更改任何捆绑配置,我有所有必需的脚本.这是完整的堆栈跟踪
异常:System.ArgumentException:值不能为null或为空.参数名称:System.Web.Mvc.UrlHelper.GenerateContentUrl(String contentPath,HttpContextBase httpContext)中的contentPath,位于System.Dynamic.UpdateDelegates.UpdateAndExecute2 [T0,T1,TRet]的System.Web.Mvc.UrlHelper.Content(String contentPath) (CallSite站点,T0 arg0,T1 arg1)位于f:\ Sample Projects\Notebook\Notebook\Views\Shared_AdminLayout.cshtml中的ASP._Page_Views_Shared__AdminLayout_cshtml.Execute()中:System.Web.WebPages.WebPageBase.ExecutePageHierarchy()处的第23行系统中的System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext,TextWriter writer,WebPageRenderingBase startPage)中的System.Web.Mvc.WebViewPage.ExecutePageHierarchy()位于System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext,TextWriter writer)System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer,HelperResult内容)的System.Web.WebPages.HelperResult.WriteTo(TextWriter writer)中的.Web.WebPages.WebPageBase.<> c_ DisplayClass7.b _6(TextWriter writer)at小号 System.Web.Mvc上的System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName,Action
1 body) at System.Web.WebPages.WebPageBase.PopContext() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1过滤器,Int32 filterIndex,ResultExecutingContext preContext,ControllerContext controllerContext,ActionResult actionResult)中的ystem.Web.WebPages.WebPageBase.Write(HelperResult结果).1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
在System.Web.Mvc.Async.AsyncControllerActionInvoker上的System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1过滤器,ActionResult actionResult)中的ControllerActionInvoker.InvokeActionResultFilterRecursive(IList 1过滤器,Int32 filterIndex,ResultExecutingContext preContext,ControllerContext controllerContext,ActionResult actionResult). > c_ DisplayClass21.<> c _DisplayClass2b.b_ 1c()在System.Web.Mvc.Async.AsyncControllerActionInvoker.<> c _DisplayClass21.b__1e(IAsyncResult asyncResult)
Ofiris.. 10
您正在调用@Url.Content(ViewBag.UserImageUrl)
null/empty参数.
在通话前放置一个断点并检查ViewBag.UserImageUrl
.
您正在调用@Url.Content(ViewBag.UserImageUrl)
null/empty参数.
在通话前放置一个断点并检查ViewBag.UserImageUrl
.