Very strange by the IIS configuration file with the mime svg head leads to a static file access to the entire site reported error

Debugging a two-day encounter a very strange problem of a system of stable operation for many years, is mvc5 + WIN2008R2 + .NET + run under 4.5 IIS environment, very stable, recently wanted to migrate to a new server, for less trouble bought a same environment on Ali cloud WINDOWS 2008 R2, go after the reported deployment of a very strange error.

1. After the deployment of new servers, all dynamic program works fine, but can not load all static files (images, css, js, html) pure static access all reported 500 error (page can not be displayed because an internal server error)

 

 

 Access any static resources alone have reported this wrong

Finally, locate the cause of the problem, the original in the web.config remove svg key phrase of mine configuration is normal. Removing the configuration node system.webServer / modules / staticContent /

<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />

It is normal to remove the add on the error (error only access static files and dynamic file normal)

 

 

 

 

 

 

 It makes very strange, only this last one removed, also remove little effect, because only a svg interface template to use landscaping icons and the like, does not affect much, but always like to eat flies. We have encountered the same problem Welcome encourage each other.

 This baffling error description text is displayed directly, there is no detailed error codes, resulting in the investigation process has been seriously misled into believing that the problem is the environment permission to install such

The last search for a solution to the traditional article is somewhat similar symptoms

https://hant-kb.kutu66.com/mip/12245572 

Preceded by a

<remove fileExtension=".svg"/>

 

 

The following are various ways to try to use quite a few detours

1. Try the site directory permissions set EveryOne full control, though very dangerous not resolved.
2. Try to runAllManagedModulesForAllRequests changed or deleted = false
3. Set up a separate application pools to run
4. Application Pool Advanced Settings -> 32 is provided to enable applications to true
5. The various attempts to restart reload environments.
6. that the bandwidth is not enough memory to increase bandwidth, memory configuration
7. Start web directory built on the C drive, and then moved to another hard disk.

This question is too weird being given away too many detours record the following mutual encouragement to others encounter

 

Guess you like

Origin www.cnblogs.com/zyczyc/p/12633997.html