Last post Aug 27, 2010 03:43 PM by papafiduk
Jun 13, 2008 10:37 AM|papafiduk|LINK
Hello everyone -- first time poster and relative newcomer to the boards. This bug I'm tackling has me at my wits' end and it's come time to turn to the masses! If this is posted in the wrong forum and/or has already been addressed, I apologize. However,
I've done thorough searches and haven't come across anything akin to what I'm facing.
I'm working with a website that has a set of custom controls, all descending from a base class. These controls take DataSets returned from web services and renders custom html via overriding the Render method. Everything works fine on my local box and
my coworker's box (both xp machines running iis 5). However, on our server (windows server 2003, 64-bit, iis 6), the html rendered by the browser appears corrupt, with garbage replacing individual characters, as follows:
Some interesting observations of this behavior:
- to reiterate, it only happens on our win2003 64-bit iis6 machine and not on xp iis5 boxes. We're not concerned with cross-browser compatibility, just the IE browser.
- the server is running with ssl encryption, however i've ruled that out as it occurs without it as well
- the corruption of bytes follow a predictable pattern: no more than 8 bytes are corrupted in a group (on occasion 6 bytes are corrupted) and they occur on a regular interval of 0x7000 bytes. Every 0x7000 bytes after the first occurrence would be another
- when stepping through code, I've confirmed that the control/page is properly rendered on the server via a dump of the html produced by the page. So at the server, just after rendering, it's appears to be fine. However, when it hits the browser, you
see the above. This occurs in both ie6 and ie7, whenever hitting the server in question.
Memory issues, right? I've closed off every stream utilized in the front-end. I tried toggling buffering options in iis and asp.net. I utilized the adsutil.vbs script and increased the AspBufferingLimit parameter on iis 6, but to no avail. One thing
that did seem to make a difference was the presence, or lack thereof, of other custom controls on the master page. ie: the master control usually has 3 major custom controls and then a content place holder for the given page (the html rendered for the custom
page is where the corruption is occurring.) However, if i comment out the controls on the master page such that only one is active - doesn't matter which one - everything renders correctly. Unfortunately, upon looking at the code of the controls and the
base class, I don't see any shared resources between them, nothing that would 'cause any interference.
I apologize for the length of the post, but I figure the more info the better. And again, if this is misplaced or I completely missed it addressed elsewhere, my bad.
Any thoughts? Have a missed anything obvious? I'm a relative newcomer to the world of asp.net, but I've managed to do alright up till now. Thanks!!
Jun 17, 2008 05:26 PM|jkirkerx|LINK
Set the right framework version in IIS Server.
UTF8 encoding in web request.
matching web.config files
generation of html inside control code was hard coded with response.write, instead of each html tag being dynamically created, so the server can create the proper html code to ouput to browser. XHTM versus HTML 4.0 Transtional.
escape characers "/"
control not compiled correctly, any CPU.
Itanium CPU error
Aug 27, 2010 03:43 PM|papafiduk|LINK
Wow, I forgot about this question. For completeness' sake, the issue turned out to be the fact that the html string was continually built up using string concatenation. Once I changed the code to write to a Html stream buffer, everything was fine.