I am developing an MVC 3 application with plugin functionality. plugins are C # dll with all necessary resources (css, images and scripts).
I used the Visual Studio extension MvcRazorClassGenerator to create precompiled views.
I am extracting the inline resource using the following code:
public FileStreamResult EmbeddedResource(string pluginName, string resourceName) { Assembly assembly = PluginCache.GetAssembly(pluginName); if (assembly != null) { string tempResourceName = assembly.GetManifestResourceNames() .ToList().FirstOrDefault(f => f.EndsWith(resourceName)); return new FileStreamResult( assembly.GetManifestResourceStream(tempResourceName), GetMIMEType(tempResourceName)); } return null; }
In the views, I have the following code for accessing resources:
@Url.Content("/Common/EmbeddedResource/PluginName/[AssemblyNamespace].Content.Images.blank.gif")
Everything works fine, while I am in the development environment, all resources are loaded and displayed correctly, but a nightmare starts during deployment.
IIS 7.5 continues to search for a static file named "/Common/EmbeddedResource/PluginName/[AssemblyNamespaceapter.Content.Images.blank.gif" rather than an embedded file, which gives me a 404 error for all the embedded resources.
I tried to install the hotfix mentioned by the question on this site and modify the configuration files, but the resources were not loaded.
I am trying to install on a 64-bit version of Windows Server 2008 R2 R2.
source share