During a deployment for a client today of a custom ASP.NET application, IIS 7 refused to render external css files correctly – just spitting out Error 500 or blank content. This happens because IIS 7 and 7.5 do NOT render static content by default – which is a little surprising but not completely unexpected.
To fix for Windows Server 2008:
- Open up Start – Administrative Tools – Server Manager on the Front End web server in question.
- Select Web Server (IIS) under Roles
- Click on “Add Role Services”
- Enable the “Static Content” checkbox.
- In IIS 7, Click on the Website and double click Handler Mappings
- Right click on “StaticFile” and click “Edit” .
- In the Module Field add “StaticFileModule,DefaultDocumentModule” and click OK
- DONE – FIXED!
The official support document for this on the MS site can be found here: