Solved! IIS not serving CSS, Images and JavaScript


When IIS stops serving CSS, Images, and JavaScript, you might start panicking and don't know what to do. Below are things to check to make sure all is good.

  1. Check in your web.config file and see if you can find where "StaticContent" directive is defined. If this section of your web.config file is present, chances are that it is preventing IIS from serving CSS, Images or JavaScript files, this is what happens before IIS Serves Static Files, it first checks in an application web.config file to see if StaticContent is defined, if IIS finds StaticContent section then it reads from there else, it results to default settings.

    Solution: Just uncomment the section

  2. Check your Server Response Header to see if there is anything restricting the Browser from loading JavaScript, CSS or Images from a cross domain. Remember, when the Browser requests assets from the Server, the server has to set rules on how the Browser is supposed to handle the assets, e.g. Content-Security-Policy, Caching, etc.



JavaScript
published
v.0.01





For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email AddressContact: [email protected]