Skip to content
Mike Cluck edited this page Jan 18, 2018 · 2 revisions
  1. If you have a different assembly name and project default namespace then the resource naming will not match up.
  2. If you have dots (such as in v1.0) in your resource path (both folder names, and filenames other than the final extension bit) then these will cause naming issues too.
  3. The virtual path provider will only intercept calls that pass through ASP.NET, which meant by default that .js, .css, .png and .jpg were fine but anything was getting 404 errors. Adding System.Web.StaticFilterHandler mappings in the section for the additional extensions resolved this.

If you think you have a resource naming issue, then throw this block into your global.asax.cs and the error will show you all the names:

var assemblies = System.Web.Compilation.BuildManager.GetReferencedAssemblies().Cast();
var resourceNames = (from assembly in assemblies from resource in assembly.GetManifestResourceNames() select resource).ToList();
throw new Exception("Embedded Resources:\r\n" + String.Join(",\r\n", resourceNames));
Clone this wiki locally