Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.5 and Razor Site: 500 errors for CSS and JS

For some reason, when I deploy my Razor MVC web site to my Windows 2008 R2 server, I'm getting 500 internal server errors for all CSS and JS. I'm not sure why, because I've done the following:

  • Enabled static content in IIS
  • Enabled anonymous access, with the default ID being the application pool identity and given that identity read/write permission to the folders
  • Ensured my static content handler was setup correctly

What other problems could it be? How can I even debug this to see what the actual error is? Even though I have an Application_Error handler, nothing is getting logged. And IIS logs doesn't give me the error info?

Thanks.

like image 611
Brian Mains Avatar asked Mar 29 '12 11:03

Brian Mains


People also ask

How do I fix 500 Internal server error in IIS 7?

IIS error The error 500.19 is an internal server error often occurring on a server using Microsoft IIS software. It indicates that the configuration data for the page is invalid. To solve the issue, delete the malformed XML element from the Web. config file or from the ApplicationHost.

Where is 500 error in IIS?

To view the actual error message description, in IIS Manager, expand the server node, expand Sites, select Default Web Site, and in the IIS section, double-click the Error Pages icon. The list of error codes and related IIS error pages are displayed. Right-click 500, and then click Edit Feature Settings.


1 Answers

I got 500 errors because I added this below to my web.config. After I removed it, I got passed the error.

<staticContent>
  <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
like image 66
user1366518 Avatar answered Sep 19 '22 14:09

user1366518