Home All Groups Group Topic Archive Search About
Author
3 May 2005 9:02 AM
t@t
Hello,

I have 2 applications, communicating with web-services. One application is
an ASP.NET application. This is sometimes updated with some data by the
other application by means of a web-service.

The ASPX page of this ASP.NET application should always display the actual
status of that data. How can I manage this the best?

One option I already implemented is to add javascript to that page:
'window.setInterval' or 'window.setTimeOut' to do a postback each second to
the server side. This works. However, I am afraid this polling scheme is not
as efficient as possible. Are there other options to update the page?

Is the IHttpAsyncHandler an option to use? To do a asynchroneous call to the
application, and let the spawn pplication thread end this request when new
data is received? Or will this not work?

In my opinion this is a very common problem and is probably already solved
many times. Waiting for your hints.

Regards,

RAK

Author
3 May 2005 12:40 PM
Scott Allen
Hi RAK:

There is no way to push data to the client in ASP.NET unless the
client has made a request - thus, polling and refreshing are the way
to go, unless you want to write software to install on the client's
machine that keeps an open connection to the server.

Show quoteHide quote
On Tue, 3 May 2005 11:02:57 +0200, "t@t" <t@t.com> wrote:

>Hello,
>
>I have 2 applications, communicating with web-services. One application is
>an ASP.NET application. This is sometimes updated with some data by the
>other application by means of a web-service.
>
>The ASPX page of this ASP.NET application should always display the actual
>status of that data. How can I manage this the best?
>
>One option I already implemented is to add javascript to that page:
>'window.setInterval' or 'window.setTimeOut' to do a postback each second to
>the server side. This works. However, I am afraid this polling scheme is not
>as efficient as possible. Are there other options to update the page?
>
>Is the IHttpAsyncHandler an option to use? To do a asynchroneous call to the
>application, and let the spawn pplication thread end this request when new
>data is received? Or will this not work?
>
>In my opinion this is a very common problem and is probably already solved
>many times. Waiting for your hints.
>
>Regards,
>
>RAK
>
Author
3 May 2005 12:41 PM
Brock Allen
> One option I already implemented is to add javascript to that page:
> 'window.setInterval' or 'window.setTimeOut' to do a postback each
> second to the server side. This works. However, I am afraid this
> polling scheme is not as efficient as possible. Are there other
> options to update the page?
>
> In my opinion this is a very common problem and is probably already
> solved many times. Waiting for your hints.

This is how the infrastructure works. If you don't want to use browser based
apps, then you can build a desktop style app and you can then build in these
sorts of asychronous notifications much easier.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Author
4 May 2005 9:07 AM
RAK
Hello,

Indeed, but after some googling I found that ASP.NET 2.0 provides Client
Callbacks, which will provides a better and more efficient solution.
However, this takes still some months...

In the meantime I found also PowerWEB LiveControls for ASP.NET. They are
promising! I downloaded a trial version and am able to do callbacks without
reloading the whole page each time.

Kind regards,
RAK


Show quoteHide quote
"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:624563632507064086345952@msnews.microsoft.com...
> > One option I already implemented is to add javascript to that page:
> > 'window.setInterval' or 'window.setTimeOut' to do a postback each
> > second to the server side. This works. However, I am afraid this
> > polling scheme is not as efficient as possible. Are there other
> > options to update the page?
> >
> > In my opinion this is a very common problem and is probably already
> > solved many times. Waiting for your hints.
>
> This is how the infrastructure works. If you don't want to use browser
based
> apps, then you can build a desktop style app and you can then build in
these
> sorts of asychronous notifications much easier.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>
Author
4 May 2005 4:14 PM
Brock Allen
> Indeed, but after some googling I found that ASP.NET 2.0 provides
> Client Callbacks, which will provides a better and more efficient
> solution. However, this takes still some months...

Yes, but it's no different -- the code in the browser has to poll the server.
The main difference in 2.0 is that you don't actually post the page, and
thus you don't get the refresh. It's still the same underlying infrastructure.

-Brock
DevelopMentor
http://staff.develop.com/ballen