JS and CSS not being served after upgrading to Umbraco 4.7
After copying the Umbraco 4.7 files into my webroot, the "Umbraco 4.7.0 Configuration Wizard" appears, but it is unstyled. When I try to load the CSS (or JS) files referenced in the page source, I get an error: "The page cannot be displayed because an internal server error has occurred."
It's happening on the install pages. We upgraded from 4.5.2. To be sure, we got 4.5.2 working on this server a couple months ago, and it sat for a while without any content, so I deleted the directories to start from scratch with 4.7.
It is running integrated mode. I should mention that this is also a medium trust environment.
I just recopied all the files, and the problem persists. If I delete web.config, the site serves the CSS and JS files, so the problem seems to be an incompatible entry in web.config.
Solved! By a happy accident, I discovered that the Umbraco 4.7.0 Configuration Wizard would display properly if I replaced the Umbraco 4.7 web.config file with the web.config file from Umbraco 4.5.2. So, I added in each new section, bit-by-bit, until I found the culprit
The following lines in Umbraco 4.7's web.config file cause JavaScript, CSS, and images not to be served properly, at least from the Rackspace "cloud" hosting service:
<!-- Adobe AIR mime type -->
<staticContent>
<mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
</staticContent>
It is a strange one! But to be clear, I had to leave the "Adobe AIR mime type" section out in order to get it to work. The site only has problems when those lines are included. I hope Adobe AIR is not central to the functioning of this latest version of Umbraco.
Aaah, ok - well Umbrao does not rely on air and I don't think that it ever will. But still a bit strange it does not work when that line is in the web.config though...
Omg, you just saved me sleepless night!!! It actually worked. I host my sites on rackspace as well and i have had a week of sleepless night trying to get this to work.
The solution (commenting out the staticContent section) definitely worked on rackspace hosting. Thanks man!
As a followup, my contents, settings and developer items under the Admin are not displaying and i am getting an xlt error on the main site. Would you happen to have a solutions ?
Wow, just came across this issue! 24 hours later, I have discovered that the nightmare only happens if you have both the staticContent/mimeMap MIME type definition in your web.config and you have the .air MIME type setup globally in IIS already!
If anyone else experiences this, either comment the staticContent mimeMap or delete the default MIME type in IIS to resolve.
We got caught out by this same issue when moving an older site to a new server. In our case the mimeMap extension was .woff. The woff font mime type had been added so the font files could be served but newer versions of Windows Server have this mimeMap entry added by default.
The error is quite obscure and nothing detailed is logged anywhere so this thread saved the day.
The best practice is to always add a remove element in the web.config before adding a mimeMap extension.
JS and CSS not being served after upgrading to Umbraco 4.7
After copying the Umbraco 4.7 files into my webroot, the "Umbraco 4.7.0 Configuration Wizard" appears, but it is unstyled. When I try to load the CSS (or JS) files referenced in the page source, I get an error: "The page cannot be displayed because an internal server error has occurred."
Hi Bryan
Is this happening in the backoffice? What version of Umbraco did you upgrade from?
/Jan
It's happening on the install pages. We upgraded from 4.5.2. To be sure, we got 4.5.2 working on this server a couple months ago, and it sat for a while without any content, so I deleted the directories to start from scratch with 4.7.
Hi Bryan
Ok...and the app pool is running integrated mode?
/Jan
It is running integrated mode. I should mention that this is also a medium trust environment.
I just recopied all the files, and the problem persists. If I delete web.config, the site serves the CSS and JS files, so the problem seems to be an incompatible entry in web.config.
Solved! By a happy accident, I discovered that the Umbraco 4.7.0 Configuration Wizard would display properly if I replaced the Umbraco 4.7 web.config file with the web.config file from Umbraco 4.5.2. So, I added in each new section, bit-by-bit, until I found the culprit
The following lines in Umbraco 4.7's web.config file cause JavaScript, CSS, and images not to be served properly, at least from the Rackspace "cloud" hosting service:
Hi Bryan
Wow...that's a weird one...I don't get how a missing .air mime-type can make the instance fail...but hey, you got it sorted and things are good :-)
/Jan
It is a strange one! But to be clear, I had to leave the "Adobe AIR mime type" section out in order to get it to work. The site only has problems when those lines are included. I hope Adobe AIR is not central to the functioning of this latest version of Umbraco.
Aaah, ok - well Umbrao does not rely on air and I don't think that it ever will. But still a bit strange it does not work when that line is in the web.config though...
/Jan
Omg, you just saved me sleepless night!!! It actually worked. I host my sites on rackspace as well and i have had a week of sleepless night trying to get this to work.
The solution (commenting out the staticContent section) definitely worked on rackspace hosting. Thanks man!
GB.
As a followup, my contents, settings and developer items under the Admin are not displaying and i am getting an xlt error on the main site. Would you happen to have a solutions ?
Thanks a bunch!
GB.
Wow, just came across this issue! 24 hours later, I have discovered that the nightmare only happens if you have both the staticContent/mimeMap MIME type definition in your web.config and you have the .air MIME type setup globally in IIS already!
If anyone else experiences this, either comment the staticContent mimeMap or delete the default MIME type in IIS to resolve.
Further to this, the best solution is to add a remove before the mimeMap in the web.config, then everything is happy!
<staticContent>
<remove fileExtension=".air" />
<mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
</staticContent>
Thanks guys, this thread saved much time.
We got caught out by this same issue when moving an older site to a new server. In our case the mimeMap extension was .woff. The woff font mime type had been added so the font files could be served but newer versions of Windows Server have this mimeMap entry added by default.
The error is quite obscure and nothing detailed is logged anywhere so this thread saved the day.
The best practice is to always add a remove element in the web.config before adding a mimeMap extension.
Dallas
is working on a reply...