Two servers, same sourcecode -> css-file with wrong content-type on server B

Two servers, same sourcecode -> css-file with wrong content-type on server B

am 18.07.2007 10:45:59 von Gerrit.Horeis

Hi NG,

A very strange behavior I'm experiencing at the moment: I've two
servers, the first is a Windows 2000 Server (Server A), the second a
windows Server 2003 x64 Editon (Server B). I have a classic ASP-File
with an



notation, which is identical on both servers. On Server A the file is
read out correctly and all styles are ok, but on server B, the styles
are not applied, although it is available at the specified
destination.

So I tried different thinks to get it included correctly, and here are
the differences on both servers:

-> when I call the css file directly with Internet Explorer or Firefox
there are no line breaks on server B, but on server A
-> the content type for this file is "text/css" on server A and "text/
html" on server B
-> on both server I have checked the MIME type dialogue of the IIS-
Root and there seems to be correct entry for .css files.

I'm using the doctype

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

and therefore Firefox uses the standard mode for displaying webpages,
and so no "text/html" files are allowed as css references.

I hope you understand my Problem and I'm really, really helpless about
this issue. Perhaps somebody can help or contribute something to this.

Thanks very much!

--
Gerrit Horeis

Software Developer
CI-Gate Development & Consulting GmbH
http://www.ci-gate.de
http://www.xira.de

Re: Two servers, same sourcecode -> css-file with wrong content-type on server B

am 19.07.2007 12:40:09 von David Wang

Content-Type is determined by a merge of Registry, MIME Type at IIS
Root, and MIME Type nearest to the resource itself.

You are saying that MIME Type at IIS Root is text/css but client sees
text/html. This means that you have some MIME Type defined for either
* or .css that is text/html, and you will have to locate where it is
set between IIS Root and the vdir containing style.css and undo it.
The UI does not show you the merged value, so it should be straight
forward to figure it out.

IIS on Windows 2000 and Windows Server 2003 resolve MIME Type in the
same way, so your difference in behavior most likely results from
different server configuration and has nothing to do with ASP source
code.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Jul 18, 1:45 am, Gerrit Horeis wrote:
> Hi NG,
>
> A very strange behavior I'm experiencing at the moment: I've two
> servers, the first is a Windows 2000 Server (Server A), the second a
> windows Server 2003 x64 Editon (Server B). I have a classic ASP-File
> with an
>
>
>
> notation, which is identical on both servers. On Server A the file is
> read out correctly and all styles are ok, but on server B, the styles
> are not applied, although it is available at the specified
> destination.
>
> So I tried different thinks to get it included correctly, and here are
> the differences on both servers:
>
> -> when I call the css file directly with Internet Explorer or Firefox
> there are no line breaks on server B, but on server A
> -> the content type for this file is "text/css" on server A and "text/
> html" on server B
> -> on both server I have checked the MIME type dialogue of the IIS-
> Root and there seems to be correct entry for .css files.
>
> I'm using the doctype
>
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> and therefore Firefox uses the standard mode for displaying webpages,
> and so no "text/html" files are allowed as css references.
>
> I hope you understand my Problem and I'm really, really helpless about
> this issue. Perhaps somebody can help or contribute something to this.
>
> Thanks very much!
>
> --
> Gerrit Horeis
>
> Software Developer
> CI-Gate Development & Consulting GmbHhttp://www.ci-gate.dehttp://www.xira.de