homepage Welcome to WebmasterWorld Guest from 54.204.77.26
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Content Type on IIS7.5
On IE it prompt to download file
alahamdan




msg:4451307
 1:57 pm on May 9, 2012 (gmt 0)

Hello

When i try to add Content-Type to IIS 7.5 to look like this:

Content-Type => text/html, charset=utf-8

It work fine with F, but IE will prompt to download the file!

Any idea why?

I also noticed some servers respond with a header showing:
Content-Type => text/html; charset=utf-8

While in my case semi colon is replaced with , like this

Content-Type => text/html, charset=utf-8

This is normal with IIS7.5?

Thanks in advance

 

Ocean10000




msg:4451309
 2:05 pm on May 9, 2012 (gmt 0)

"text/html; charset=utf-8" is the correct form to use.

IE doesn't couldn't find a match on how to render "text/html, charset=utf-8" so it asks for you to download it.

I am assuming Firefox just ignores what it doesn't understand, or has a code path that handles this case.

When you added the content type you more then likely added it with a "," instead of ";"

alahamdan




msg:4451313
 2:16 pm on May 9, 2012 (gmt 0)

Hello Ocean10000

This is a fast useful response.

In fact I just add the content name and type via IIS7.5 IU.

and IIS produce the , with no control from my side!

Any idea why or how to fix it?

seems like i need to search for how to replace , with ; for IIS, since searching the problem the way i described in the post lead to no results!

Many thanks

Ocean10000




msg:4451341
 3:30 pm on May 9, 2012 (gmt 0)

Here is a little quick walk though I found on Microsoft Technet, on how to edit MIME Types.

Edit a MIME Type (IIS 7) [technet.microsoft.com]

alahamdan




msg:4451348
 3:39 pm on May 9, 2012 (gmt 0)

thanks again ocean,

In fact i thought of mime type, since i found no .php (my root document file) mime type.

I asked my host, they said php isn't handled by mimetype, its handled via handlers, and is added to be handled via fastcgi in our case.

I also made a try, added .php mimetype as text/html and nothing changed!

I spent hours searching the web, just one post talking about it on IIS forum with no resolution.

I replied back to host (who consider this outside their support scope) to see if they can help, they usually do if they have the info.

Will update this post with any new findings!

Thanks again

Seb7




msg:4452442
 12:28 am on May 12, 2012 (gmt 0)

I get this when I havenít yet mapped the php on the website. On the IIS manager, right click on the website, > home directory > configuration > add the php.exe to the .php.

If they are providing php, then this is their issue.

alahamdan




msg:4452601
 2:38 pm on May 12, 2012 (gmt 0)

Hello Seb7

What configuration you mean? Im using IIS 7.5

In fact php is loaded and working without issues!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved