Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Mime Types Option in IIS 7

I have a problem in IIS whereby I have installed a web applcation that runs using .NET but when you navigate to it none of the images are displayed and the CSS is not being used, so the page is completely unformatted.

I am stumped by this but I was wondering if it could be something to do with permitted MIME types, so was going to check which ones were permitted when i noticed tghat the MIME types option is not present.

I can see it in IIS on another server in the IIS section when you click on a site, but it is just not present on this server. Does anyone know:

a) Why it is not there and how you can get it back b) If it could be the cause of the problem whereby the CSS is not detected and no images are shown?

I hope that I've explained this properly but will be happy to provide any more information to anyone that is happy to help!! :-)

Thanks

like image 950
5lovak Avatar asked Jun 16 '11 15:06

5lovak


People also ask

How do I enable MIME type?

In the Connections pane, go to the site, application, or directory for which you want to add a MIME type. In the Home pane, double-click MIME Types. In the MIME Types pane, click Add... in the Actions pane. In the Add MIME Type dialog box, add the file name extension and MIME type, and then click OK.

Which MIME type is default MIME type present in IIS?

Add or Edit MIME Type Dialog Box If IIS does not recognize the file name extension requested by the client, IIS sends the content as the default MIME type, which is Application.


1 Answers

To solve the missing (blank CSS) and image issue, you need to install the Static Content Role.

  1. Start -> Administrative Tools -> Server Manager
  2. Select Web Server under Roles
  3. Third option down is Static Content under Common Http Features
  4. Install it

Your static content will now be served.

If you need to add specific MIME types then you can use the newly installed MIME Types feature. The new Role will not be shown until you restart IIS Manager.

like image 198
Rebecca Avatar answered Sep 19 '22 10:09

Rebecca