You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
Yesterday I've been looking all over the internet looking for a solution to this error:
Could not load control: '/Umbraco/UrlTracker/InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManagerWrapper.ascx'. Error message: System.Web.HttpException (0x80004005): The file '/Umbraco/UrlTracker/InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManagerWrapper.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at Umbraco.Web.UI.Umbraco.Dashboard.UserControlProxy.OnInit(EventArgs e)
Many people seem to have the issue, but no one has found an good answer. I believe the answer can be found here: https://stackoverflow.com/a/4433225
In brief: HostingEnviornment explicitly ignores Virtual Path Providers in precompiled sites.
In UrlTrackerPreApplicationStart.cs: HostingEnvironment.RegisterVirtualPathProvider(new EmbeddedResourcesVirtualPathProvider());
Has to be replaced with: typeof(HostingEnvironment).GetMethod("RegisterVirtualPathProviderInternal", BindingFlags.Static | BindingFlags.InvokeMethod | BindingFlags.NonPublic) .Invoke(null, new object[] { new EmbeddedResourcesVirtualPathProvider() });
The text was updated successfully, but these errors were encountered:
Indeed, I saw yesterday that lots of people had the issue, that's why I've provided this solution (or so I hope).
The .ascx controls are working on localhost, but not on our dev server, which is Windows Server 2012R2 with IIS 8.5. The only difference in setup is that the server has a precompiled version running. By investigating that angle, I've stumbled upon the stackoverflow article above.
Yesterday I've been looking all over the internet looking for a solution to this error:
Could not load control: '/Umbraco/UrlTracker/InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManagerWrapper.ascx'. Error message: System.Web.HttpException (0x80004005): The file '/Umbraco/UrlTracker/InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManagerWrapper.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at Umbraco.Web.UI.Umbraco.Dashboard.UserControlProxy.OnInit(EventArgs e)
Many people seem to have the issue, but no one has found an good answer. I believe the answer can be found here:
https://stackoverflow.com/a/4433225
In brief: HostingEnviornment explicitly ignores Virtual Path Providers in precompiled sites.
In UrlTrackerPreApplicationStart.cs:
HostingEnvironment.RegisterVirtualPathProvider(new EmbeddedResourcesVirtualPathProvider());
Has to be replaced with:
typeof(HostingEnvironment).GetMethod("RegisterVirtualPathProviderInternal", BindingFlags.Static | BindingFlags.InvokeMethod | BindingFlags.NonPublic) .Invoke(null, new object[] { new EmbeddedResourcesVirtualPathProvider() });
The text was updated successfully, but these errors were encountered: