Run a download from the Internet, an MVC project, the runtime can not display the style, JS also error.
Check the path is not a problem, later in the configuration to remove one of the configuration
<staticContent>
<!--Remove first in case they is defined in IIS already, which would cause a runtime error---
<remove fileextension= ". Woff"/>
<remove fileextension= ". Woff2"/>
<mimemap fileextension= ". Woff" mimetype= "Application/font-woff"/>
<mimemap fileextension= ". Woff2" mimetype= "Application/font-woff2"/>
<mimemap fileextension= ". JSON" mimetype= "Application/json"/>
</staticContent>
The results can be displayed normally, and then found to be added <remove fileextension= ". JSON"/> a duplicate. JSON node appears in the configuration section, resulting in a configuration exception and the system does not function properly.
Only IIS Express did not throw out the error.
Later, after trying, the steps to throw the exception are as follows:
1. Add the following module and add other module to
<add name= "applicationinsightswebtracking" type= " Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.ai. Web "/>
---->
<system.web>
<authentication mode= "None"/>
<compilation debug= "true" targetframework= "4.5"/>
<authorization>
<allow users= "*"/>
</authorization>
<add name= "applicationinsightswebtracking" type= " Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.ai. Web "/>
</system.web>
<system.webServer>
2. Add a configuration
<validation validateintegratedmodeconfiguration= "true"/>
--->
<system.webServer>
<validation validateintegratedmodeconfiguration= "true"/>
<staticContent>
<!--Remove first in case they is defined in IIS already, which would cause a runtime error---
<remove fileextension= ". Woff"/>
<remove fileextension= ". Woff2"/>
<mimemap fileextension= ". Woff" mimetype= "Application/font-woff"/>
<mimemap fileextension= ". Woff2" mimetype= "Application/font-woff2"/>
<mimemap fileextension= ". JSON" mimetype= "Application/json"/>
</staticContent>
</system.webServer>
After running:
Native Debug ASP. NET MVC cannot load CSS with JS