tags:

views:

75

answers:

3

I have a website with live stats that I wish to display to every agent (150) in a call centre. The agent application is windows forms and so the obvious way would be to host a WebBrowser control and simply point it to the site. However the site is not mine, and the site owner is understandably nervous about a site going from very little traffic to a constant stream of 150 (and this number is continually growing) users.

Is there a way to cache the site and then display the results to each user? The site uses AJAX to update which scuppers my initial plan of using HttpWebRequest to save a copy of the page every 5 seconds and then have the app look at this.

A: 

You can use HttpWebRequest to get the same data that the site's AJAX calls are getting, and then you can render the data in your Winforms app however you see fit. By doing a view source on the web page, it shouldn't be too difficult to determine the URL(s) that are being accessed via AJAX.

Adam Crossland
You'd think so...it is an asp.net page and I am struggling to find this. If I use Fiddler to inspect the traffic it is just postbacks to the main URL as it appears the whole form is wrapped in an update panel.
Macros
Would the site owner be will to present the data as a simple XML feed? That would allow you to get the data once, disperse it to your many client apps with no load on his server, and you could render it in your winforms apps as needed without having to embedded a whole web browser.
Adam Crossland
A: 

Perhaps a proxy server between your call centre machines and the external site? There are some free or very reasonable options available.

You could even set up your own web page that queries the remote site once every minute and reserves the content in its own response.

James Westgate
+1  A: 

Does the user have to interact with the web page or is it a read-only view?

If it's the latter then you could create a service application hosted on your own machine which would poll the web site at some interval. With each poll you would perform an image capture of the page via the Win32 BitBlt method. The clients would then connect to your server and get updated image on a timer instead of a web page. You would reduce the # of clients hitting your customer's web site to 1 and shift the load to your network. This would be a read-only proxy of sorts for you and of course it would only work if you don't need to take user input into the web page.

Paul Sasik
The user doesn't need to interact with the page. Neat suggestion, I'll check out the BitBit method
Macros