views:

43

answers:

1

I have a page where I am pulling a dataset from the database, a few thousand records. I get it when the page is loaded and store it in the cache. Each time an operation is performed on the page, I check the cache to see if its still there, and if not, go get it again (20 minute expiration); fairly typical setup.

When I run the page, the initial data loads fine, and a default RowFilter is applied to the data. When I change the value of a dropdown (which changes the RowFilter), the page hangs for a moment, then returns a javascript error:

Line: 80772370 (yes, thats line 80 million...)
Char: 17
Error: Syntax error
Code: 0
URL: -the url of the page I'm on-

This error is repeated EXACTLY 20 times.

When I re-run the page and the operation that renders that error, I get a different line number (for example, the next time I ran it after I posted the above message, the line is at 80718666), exactly 20 times again.

Now a few curveballs:

  1. I was having the exact same issues when I was using the Session to store the data rather than the cache.
  2. I do not have this problem in the development environment (this is happening in QA). The web.config for each environment are nearly identical, but the primary difference between them is that QA uses a sessionState server that is separate from itself. This is why I moved from Session variables to the cache in the first place.
  3. When the search criteria is intended to return no results at all, it performs as it should (shows no results).

Now this hasn't exactly been my best week, so maybe I'm missing something big, but I could use some guidance.

Thanks SO community.

+1  A: 

Dear Honus

if you use UpdatePanel, remove it to see what's the real error is because now the error is hidden on a javascript return string, in the position you mention.

After you find your error, bring up again the UpdatePanel.

I can assume that the error is a null object/control that have been cached, and you forget to check if it not null.

When you cache parts on your page, and controls, then you need to check them on your back code, if they are null before use them.

Aristos
Well, I get no errors at all that way... your thoughts? I am checking for null in the cache. Clearly the simple answer would be not to use that updatepanel, but I'd prefer that I keep it in there.
Honus Wagner
@Honus Move the updatepanel only for locate the error, then place it back again. Also you can use try catch inside the code that make the updates on update panel and log error.
Aristos
There is no error though, thats the thing.
Honus Wagner
@Honus maybe its a time out of your UpdatePanel, or a viewstate error on some control. Can you capture the global error of that page and log it ? Do you remove the update panel for tests ?
Aristos
This issue was never resolved. I ended up releasing the software without the update panels.
Honus Wagner