Server push to client

  • Thread starter Alin Capitanescu
  • Start date
A

Alin Capitanescu

Hi all!

I need some help with asp.net!
Is there any way to make the client BROWSER (IE, NETSCAPE, OPERA etc) to
wait for messages from a http/https host (server) in an internet
environment?

The main idea is not to refresh the client page or a component at a moment
of time, but to make the server push some messages to client when changes
are made into database.... Refreshing the page every x seconds/minutes makes
traffic on the internet for nothing...
What is .NET Remoting?

Please post an example.

PS: A method I found is to use java applets with sockets connected to
server... But I only want to use ASP.NET with VB.NET.
 
S

Steve C. Orr [MVP, MCSD]

You won't get functionality from this out of a web browser and simple HTML.
The best you can do is have the client send a request to the server every so
often to check for updates.
You can have the client refresh on a regular basis with a meta tag like
this:
<META HTTP-EQUIV="refresh" CONTENT="3">
That will cause the browser to refresh every 3 seconds.
Or you can do this programatically from client side code such as javascript:
location.reload();
You can use SmartNavigation to make these refreshes less annoying to the
user.
Here's more information:
http://msdn.microsoft.com/library/d...fsystemwebuipageclasssmartnavigationtopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconpage.asp

If you need richer communication you'll have to design it yourself using a
thick client and your own networking code.
For this kind of thing you can use Remoting and the TCPChannel class.
Here's more info:
http://www.dotnet247.com/247reference/msgs/20/103391.aspx
http://msdn.microsoft.com/library/d...meRemotingChannelsTcpTcpChannelClassTopic.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top