I have an Azure project with a single webrole that I am trying to get to run properly after upgrading to Windows 8 and Visual Studio 2012.
The problem is with any static content, it returns a HTTP 500 Internal Server Error with this text: "The page cannot be displayed because an internal server error has occurred." This error is presented for any static content (images and javascript), while dynamic content is served fine (all controller actions work fine).
We cannot get IIS to present a detailed error message. The only reference we can find to the error is in the access log, which presents it as a 500 subtype 19 error.
We've tried switching between IIS and IISExpress, same error occurs. We've tried adding all the "show detailed error messages" options to our web.config and IIS Manager. The same error happens on both HTTP and HTTPS endpoints.
What should be my next steps?
The culprit has been discovered. By comparing a default web.config
with our web.config
we discovered this in our web.config
:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>
</system.webServer>
IIS8 has support for the WOFF built in, while IIS 7 did not. Simply moving this line into a transform solved the issue.
I came across this a long time ago and the answer from Vegard Larsen worked great. However, I've since upgraded to osFamily 3 (Windows Server 2012) and found that I was once again getting the 500 error with subtype 19 when deploying to Azure. The fix was to use the following in the transform.
<system.webServer>
<staticContent xdt:Transform="Insert">
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/x-woff" />
</staticContent>
</system.webServer>
The important part is to remove any existing .woff configuration. That way you can be sure it'll work on any IIS platform/configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With