“/en”应用程序中的服务器错误。

虚拟路径“/WebUserControl/news/list.ascx”映射到另一个应用程序,这是不允许的。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentException: 虚拟路径“/WebUserControl/news/list.ascx”映射到另一个应用程序,这是不允许的。

源错误:


行 82:         userControlPath = string.Format("/WebUserControl/news/{0}.ascx", userControl);
行 83:         if (System.IO.File.Exists(Server.MapPath(userControlPath)))
行 84:             PlaceHolder1.Controls.Add(Page.LoadControl(userControlPath));
行 85:     }
行 86: }

源文件: d:\wwwroot\2018\CEC\en\news.aspx.cs    行: 84

堆栈跟踪:


[ArgumentException: 虚拟路径“/WebUserControl/news/list.ascx”映射到另一个应用程序,这是不允许的。]
   System.Web.VirtualPath.FailIfNotWithinAppRoot() +9824127
   System.Web.Compilation.BuildManager.ValidateVirtualPathInternal(VirtualPath virtualPath, Boolean allowCrossApp, Boolean codeFile) +10229201
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +463
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +107
   System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) +107
   System.Web.UI.TemplateControl.LoadControl(String virtualPath) +29
   news.GetUserControl() in d:\wwwroot\2018\CEC\en\news.aspx.cs:84
   news.Page_Load(Object sender, EventArgs e) in d:\wwwroot\2018\CEC\en\news.aspx.cs:24
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4261.0