Wednesday, March 21, 2012

Need Help from you all

Hello All,

I am pretty new to ASP.NET 2.0 and AJAX... I am working on a project.. which basically

provides the real time monitoring of our system...

I have various grids, labels.. text boxes.... on one single real time screen...

Currently I am using multiple update panels with one timer control...

Applications working fine.. but sometime at random places.. error occurs.. different kind

of errors...

i have various classess... like to populate grids.. i have a grid class.. similary.. for

labels.. i have seperate class.. methods in the classes basically use stored procedures to

fetch the data.

I dont know is this the right approach... or should i use web service... or what??


I am pretty confused how to go on with this?? what is the ideal solution in a situation

like this??

I am really looking forward to u all to help me in this problem.. My project's deadline is

approaching..

Best Regards,
Faisal Fareed

Hi Faisal,

I'd like to help you, but I'm not clear about your problem.
Can you elaborate your situation?

Dear Raymond,

Many thanks for your reply.

Actually I am developing an AJAX enabled web application using ASP.NET 2.0 (C#). I have number of webforms for different type of users (registered in my application's DB).

I will take one web form (branch.aspx) that will be for GENERAL USERS group.

I have 7 update panels, one timer control, 3 grids and various labels.. all these controls are divided in my update panels... each control's data is fetched from a seperate stored procedure..

I have implemented 3 classes (one for grid, one for labels and one for my graph) and methods in these classes throws me the data...

My question is.. is this the right approach to work AJAX enabled web applications or not?? Moreoever I am getting client side exceptions.. like PageRequestManagerTimeOutException, PageRequestManagerServerErrorException... I dont know how to handle them.. I want to avoid these popups..

I hope now you understand my problem.

Waiting for your response.

Best Regards,

Faisal


To make use?of UpdatePanel?is?the?easiest?way?of?making?a?Ajax?enabled?web?application.?And?most?of?time,?it's?the?best?choice.
But as you've said, it's a real time system. I think the the timer which fires too frequently may bring too much burdens?to?the?server.

I've the following suggestions for you:
1. Reduce the interval of the Timer control
2. Set the UpdatePanel's UpdateMode to conditional to avoid uncessory traffic.

Dear Raymond,

Ok, suppose I change the UpdatePanel's property UpdateMode from Always to Conditional.. Do I need to add up any extra code??

I have increased the timer control... now things looks pretty better than before...

One more thing.. the approach I mentioned in my last post to fetch the data and populater my controls on webform...is it ok? or do i need to use web services?? or any other approach.

Best Regards,


You need to explicitly call UpdatePanel's update method to have its data refreshed.

Basically, I think your current approach is OK. There will be more performance hit if you switch to web service.

Raymond,

thanks for your time and guidance on this. Can you tell me if there are any published publicly available performance analysis works which compare Updatepanels to other forms of asynchronous calls in an AJAX app?

thanks,

Paul


Raymond Wen - MSFT:

To make use of UpdatePanel is the easiest way of making a Ajax enabled web application. And most of time, it's the best choice.
But as you've said, it's a real time system. I think the the timer which fires too frequently may bring too much burdens to the server.

I've the following suggestions for you:
1. Reduce the interval of the Timer control
2. Set the UpdatePanel's UpdateMode to conditional to avoid uncessory traffic.

Hi Ramond,

We're getting the 'PageRequestManagerServerErrorException (Error 500)' error here too. TheAJAX v1.0 application is a customer numbering system (CSAS) where 14 counter clerks each hit a Web Service every 3 seconds. The VB data access Web Method that the client hits, caches for 8 seconds. The error occurs seeming randomly as many as 6 times in a work day – the same in two offices, each with there own server. It seems to affect all clerk PCs the same and usually occurs without keyboard activity. The clerk only needs to click OK to acknowledge the error – but none the less, the error needs to be fixed. The entire markup is within a single triggered UpdatePanel.

Other errors pop up once in a while too. The 500 error is the most prevalent and has our attention for now. We've watched the forums since 1/2007 and tried all of the recommended fixes and work a rounds, as best we could, but to no avail.

We previously hacked through a persistent PageRequestManagerParserErrorException error using btolly's java script work-around posted inhttp://forums.asp.net/thread/1602799.aspx .

We've written several other helper applications in our office using AJAX UpdatePanels and triggers, all working as expected. Admittedly the CSAS project code is crude and needs to be rewritten, but not until we're convinced that we're inside the envelop and convinced thatAJAX can handle the issue of such constant and repetitive activity using theAJAX timer and UpdatePanel.
Any comments?

Thanks,
Glenn Michael


We are getting the dreaded Sys.WebForms.PageRequestManagerServerErrorException with a 500 too and found the central issue. On one server we are using sessionState of mode="InProc" but on our load balanced webfarm we are using mode="SQLServer". On the InProc server we are not getting the Ajax error but we are on the SQLServer using theSAME CODE. We're researching the problem but wanted to know if anyone else was getting this error.

No comments:

Post a Comment