views:

95

answers:

2

I've run into a weird issue with a site running ASP.NET MVC on IIS7.

Whenever I do a page refresh (F5), the external stylesheet content gets "injected" into the page itself, instead of the tag pointing to the css file. Example:

<head><link type="text/css" rel="stylesheet" href="external.css" /></head>

Renders as:

<head><style type="text/css">body{ color: #000; }</style></head>

Locally, there is no issue at all, only when it is uploaded to the server. If I do a hard refresh (Ctrl + F5), it renders as it should, but subsequent requests will not.

I'm inexperienced with IIS7, so I don't know if this issue could be caused by it.

Any help would be appreciated.

A: 

Well, this is a weird issue. I don't know if IIS7 has a setting, or a handler that would cause this.

Try using a tool like Fiddler or Live HTTP Headers to verify the external CSS file is actually not being requested at all.

çağdaş
+1  A: 

Turns out an improperly closed script tag was wrecking havoc with the page.

After fixing it the page renders normally.

Sir Code-A-Lot