views:

3353

answers:

13

This question is a spin-off/evolution of this question. (That question got marked as resolved because I put a bounty on it and it auto-resolved, but it never really got answered.)

The summary is this: we have an ASP.NET site. Sometimes we get errors when the client asks for bizarre urls. From the resources the client is asking for, it looks like there is a 4k block of text missing from the html source.

A simple example...if we have a page that looks like this:

<a href="myValidLink.aspx">Here's some text</a>
a bunch more stuff
...(a large block of text)...
AND NOW MORE STUFF LATER

The client may ask for the url: "myValidLiORE%20STUFF%20LATER".

It acts as though a section of the html source just wasn't there...and that section that is missing seems to be exactly 4KB (4096 bytes) long (or according to some people, sometimes 1KB?).

Unfortunately, we are unable to replicate this error on demand, though we see it coming in from clients many times per day.

At first we thought this was a problem with Webresource.axd, because we happened to see it there a lot...but now I think that was primarily because we were grouping similar errors together, and those errors tended to happen when the corruption occured in that particular area. Now that I'm looking at a wider range of problems, I'm seeing places where we're getting very different errors that look like they're being caused by the same problem of dropping out a chunk.

We've seen this a lot with IE 8, and it has gotten more frequent as IE 8 has become more prevalent. We see it occassionally with a browser that reports itself as IE 7...which IE 8 will do if it's put into "compatibility mode".

My theory, at this point (which I'm trying to find a way to test) is that the web server is correctly sending out all of the data in the byte stream...and that the browser, IE 8, has a problem, and drops a memory page (4k) of it under some conditions.

I'm a bit worried about this theory, however, since apparently some people have reported seeing this "occassionally" with IE 6 or FF 3...these tend to be outliers, and could be just different problems with similar symptoms, but if it's really the same thing on those browsers, that would blow my theory out of the water. Still, I don't have a better idea at this point.

One other idea I've had is perhaps a relatively recent service pack to on the server is causing problems with the data being served to the clients, dropping the occasional 4KB. The problem with this theory is that it doesn't explain the great preponderance of the errors on IE 8, and the lack of them on other client browsers.

So the questions, which hopefully will eventually have answers:

  1. Has anyone else encountered this? (maybe now that it's on your radar?)
  2. Can anyone replicate this problem consistently?
  3. Any ideas of what it is? Can you verify or refute my theory?
  4. Are there any fixes or workarounds?
+3  A: 

Yes, we've seen this too but unfortunately we can't reproduce it - the problem seems to appear at random.

We've only seen the problem occur with MSIE 8.0 (Check for "Trident/4.0" on those IE7s you're seeing). 4k seem to be randomly removed from the page's markup, resulting in subsequent requests for invalid URLs since the HTML is messed up.

This has nothing to do with ASP.NET as we are seeing the same problem on two distinct servers:

  • IIS 6 on Windows 2003 (keepalive off)
  • Jetty 6.1.7 + Apache 2.2 on RHEL 5 (keepalive on)

The only things I can think of that these two have in common are:

  1. The client is MSIE 8
  2. The servers are behind a Cisco load balancer (CSS 11501)

Looks like a serious bug in MSIE 8 but I have no idea how to work around the problem.

Martin
Good tip on looking for "Trident/4.0". Going back, I have not yet found an instance where we see this type of error when it reports as IE 7.0 that doesn't have "Trident/4.0". I *have* to believe this is an IE 8 issue.
Beska
Quick question, do you have a load balancer in use on your end?I'm just trying to see if there's *anything* we can do to work around the problem here... I mean, if 4k is randomly removed from the markup and a user clicks "Confirm" he could (theoretically speaking, and depending on the application) end up confirming some different action if <input> fields are missing from the markup or if <form action="..." has been corrupted.
Martin
We do have a load balancer in our particular situation, yes...I'm not sure exactly how that helps, unless you're wondering if it's worth it to try to pull the load balancer out and see if the problem goes away. I'm having a hard time imagining why IE 8 would somehow trigger a problem with the load balancer to drop out 4k, though...am I missing something?
Beska
(But to your secondary point...that bad data could be posted back...absolutely! It seems almost inevitable that it could happen at some point.)
Beska
There's no logical reason for those 4k to get lost even with a load balancer - I was just trying really hard to find anything special with our setup and the load balancer is the *only* thing in common between our two servers having this problem.IE8 could be using some special TCP implementation that doesn't handle out-of-order packets properly or something... and unicorns may also exist. I think dropped memory pages is a more likely explanation!
Martin
Trying to find what's in common and explore it (even if it seems like a longshot): absolutely makes sense to me. Good idea to try to explore ideas without shooting them down too quickly...I've been surprised by too many things when debugging...making assumptions can kill you during debugging.
Beska
We don't have a load balancer, and are experiencing the same problem.
Alex Czarto
A: 

Please ignore this answer as it does not contribute. Sadly, I can't seem to delete my own answer.

please ignore; see below.
EricLaw -MSFT-
A: 

We, too, have the same problem. Our site is load balanced over 14 servers by a Citrix Netscaler. It has been for a long time, but these problems started recently. I don't know exactly when.

  • The servers are Windows 2003, running ASP.NET on IIS6. Compiled against 3.5.
  • IE8 seems to be the only client causing this error. It occurs on all pages.
  • We are averaging about one error/minute.
  • We can't reproduce it, and have no clues on how to move on.

Is there any more info out there?

Examples of broken url's:

/ScriptResource.axd?d=_WFIBFT6VnV8tWO4uBNcSB8alYe33BwH5sqe1vuQ0u9eqHSi1fum6L-8oY>    <script type=
/WebResource.axd?d=RoHfaR8Coz-XpWOFrNBU<li><a href=
A: 

We too have the same problem with two different ASP.NET applications on two different servers at two different customer's sites.

Both servers are Windows 2003 running ASP.NET 3.5 SP1 on IIS6.

Sample requests (same page but different RAW url:s using URL rewriting):

/WebResource.axd?d=ANpdqNBxu9b_NyZOE1---><div%20class=
/WebResource.axd?d=ANpdqNBxu9b_NyZOE1%20--><div%20class=

Browser is always IE8.

It seems that the missing block is always 4096 bytes long.

+12  A: 

*Edit 4/1/10: * Update: The 4k bug is now fixed by the IE8 Cumulative update on 3/30/2010. blogs.msdn.com/ieinternals/archive/2010/04/01/

The Internet Explorer team has been investigating this issue.

-=Impact=-

Thus far, we believe the problem has no impact on the end-user's experience with the web application; the only negative effect is the spurious/malformed requests sent by the JavaScript speculative-download engine. When the script is actually needed by the parser, it will properly be downloaded and used at that time.

-=Circumstances=-

The spurious-request appears to occur only in certain timing situations, only when the pre-parser is forced to restart (as when a META HTTP-EQUIV tag containing a Content-Type with a CHARSET directive appears in the document) and only when a JavaScript SRC URL spans the 4096th byte of the HTTP response body.

-=Workaround=-

We currently believe this issue can generally be mitigated by declaring the CHARSET of the page using the HTTP Content-Type header rather than specifying it within the page.

So, rather than putting

[META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"]

In your head tag, instead, send the following HTTP response header:

Content-Type: text/html; charset=utf-8

Note that specification of the charset in the HTTP header results in improved performance in all browsers, because the browser's parsers need not restart parsing from the beginning upon encountering the character set declaration. Furthermore, using the HTTP header helps mitigate certain XSS attack vectors.

EricLaw -MSFT-
http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx
EricLaw -MSFT-
Setting an HTTP Header in IIS uses it for all requests, even for stylesheets and images. Is there a way to do this without setting it in IIS?
goldenratio
You could use an ISAPI filter, or have your ASP/ASPX code add the header manually. However, as noted over on the IEInternals blog, we've determined that there are quite a few different ways to trigger the buggy behavior, and unfortunately pre-parser restart due to charset is only one of them. A fix is needed in the browser to really eliminate this problem.
EricLaw -MSFT-
Update: The 4k bug is now fixed by the IE8 Cumulative update on 3/30/2010. http://blogs.msdn.com/ieinternals/archive/2010/04/01/IE8-Lookahead-Downloader-Fixed.aspx
EricLaw -MSFT-
A: 

Interesting, however, I am not setting this tag at all and I still have the issue. I do have the following at the top of my page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
<meta name="verify-v1" content
Please email me a network capture (see www.fiddlercap.com)
EricLaw -MSFT-
We are seeing the same problem and we don't have a META HTTP-EQUIV. So far we can't figure out a pattern of when the problem occurs so it is hard to get a network capture. We have only seen it on IE8 PCs
TonyB
If you send me the HTML source of the affected page (or the URL, if it's public), I may be able to help. Beyond the charset declaration, there are a few other things which will cause the pre-parser to restart, and one of those may be the factor here.
EricLaw -MSFT-
is there an Email address i can contact you at? It is not a public site and I don't really want the full html online (intranet page).
TonyB
More Info: I though I had the HTML that caused the problem but can't reproduce by just viewing that html in IE8. Could refreshing the page or an ajax query case the pre-parser to restart? The page in question has a bit of ajax going on so it is hard to reproduce exactly what is happening on the client.
TonyB
My email address is ericlaw at Microsoft, and can be found on the Fiddler2 website as well. Thx.
EricLaw -MSFT-
A: 

hi all,

Adding the Content-Type: text/html; charset=utf-8 does not work for my website. We are still being flooded by the Invalid Viewstate error mails. Please help!

regards Harish

Removing the content-type meta tag only works if there is no other reason for the browser to restart parsing. Having a namespace in the html tag also causes a restart, so if you are using XHTML it doesn't help removing the meta tag.
Guffa
A: 

Has anyone heard anything about a fix? Is there someplace else we can look for information? Almost every error on our site is caused by IE8.

+1  A: 

http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx is the current post on this issue.

The Missing 4k Bug: The article states: "By declaring the CHARSET of the page using the HTTP Content-Type header rather than specifying it within the page, you can remove one cause of parser restarts." Eric Lawrence in an email: "Unfortunately, another known cause of parser restarts is use of XML namespaces, which your site appears to use." So if you use XHTML the 4K issue can occur!

hofstee
A: 

We have the same problem. I'm adding:

        Response.ContentType = "text/html"
        Response.Charset = "utf-8"

to our base page class. I'll report on the results shortly.

NickAtuShip
No luck - still having the issue.
NickAtuShip
+1  A: 

any news from IE8 team on the fix....my iis log is full of these messages...my network admin is on my back....

ans
see http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx
EricLaw -MSFT-
A: 

FWIW Here are the stats I got from 1 month of logs in LogParser.

12331 hits to ScriptResource & WebResource / 183 errors

Broken down by useragent info. Seems to support the IE8 only theory (plus "compatibility mode" user agents).

cs-uri-stem           MSIEVersion TridentVersion  COUNT
/WebResource.axd      MSIE+8.0    Trident/4.0     100
/ScriptResource.axd   MSIE+8.0    Trident/4.0     36
/WebResource.axd      MSIE+7.0    Trident/4.0     44
/ScriptResource.axd   MSIE+7.0    Trident/4.0     2
/ScriptResource.axd   NOT IE      NOT Trident     1

The single non-IE8 error has no querystring at all, coming from a Firefox/3.5.3 browser (got to be unrelated).

I don't have any META HTTP-EQUIV="Content-Type" in my pages. Although I DO have this to bounce out non-Javascript users.

<noscript>
    <meta http-equiv=Refresh content="0; URL=/ErrorPage.aspx?Error=NoJavascript">
</noscript>
russau
A: 

any fix exists? im also having this problem

sharru