How/where does asp.net populate System.Web.UI.ScriptManager.ScriptResourceMapping
? When I debug an untouched empty ASP.Net webforms project (targeting .NET 4.6.1 if it matters) and set a breakpoint at the beginning of Application_Start(object sender, EventArgs e)
, there are already 15 definitions:
The call stack doesn't tell me what code was run before this (just says [External Code]) and the only place in the entire solution that references ScriptManager
is in BundleConfig#RegisterBundles()
which is called after my break point and only adds a single definition.
The reason I ask is I was recently brought in to troubleshoot another project and I found that for some reason, it had a nearly empty ScriptResourceMapping and I ended up copying the values from the debugger of a template project and manually adding them in code in the malfunctioning project. I just want to better understand what went wrong.
Again, this question is about how a totally new webform project populates the ScriptResourceMapping
s. Here's the packages.conf of the project. Notice there are a few ScriptManager packages. Perhaps it is something in these packages that loads definitions into ScriptManager.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net461" />
<package id="AspNet.ScriptManager.bootstrap" version="3.0.0" targetFramework="net461" />
<package id="AspNet.ScriptManager.jQuery" version="1.10.2" targetFramework="net461" />
<package id="bootstrap" version="3.0.0" targetFramework="net461" />
<package id="jQuery" version="1.10.2" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.0.6" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.Web" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.WindowsServer" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.AspNet.FriendlyUrls" version="1.0.2" targetFramework="net461" />
<package id="Microsoft.AspNet.FriendlyUrls.Core" version="1.0.2" targetFramework="net461" />
<package id="Microsoft.AspNet.ScriptManager.MSAjax" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.AspNet.ScriptManager.WebForms" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
<package id="Microsoft.AspNet.Web.Optimization.WebForms" version="1.1.3" targetFramework="net461" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.7" targetFramework="net461" />
<package id="Microsoft.Net.Compilers" version="2.1.0" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
<package id="Modernizr" version="2.6.2" targetFramework="net461" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" />
<package id="Respond" version="1.2.0" targetFramework="net461" />
<package id="WebGrease" version="1.5.2" targetFramework="net461" />
</packages>