Native Debug ASP. NET MVC cannot load CSS with JS

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.