[Mono-list] Mono, ASP.NET et Javascript push

Joe Audette joe_audette@yahoo.com
Thu, 3 Feb 2005 12:51:47 -0800 (PST)


--0-264031564-1107463907=:91845
Content-Type: text/plain; charset=us-ascii

I don't think you should and probably can't keep a connection alive in a web page.
The web is a stateless environment you request a page, you  get a page, you're done.
 
I would suggest you can make additional requests as needed inside an IFrame so the outer page is not refreshed but the page in the IFrame can carry on a dialog back and forth with the server using multiple requests.
 
Hope that helps,
 
Joe

Alain Perry <alain.perry@gmail.com> wrote:
Hi list,

This is partly OT, but I thought maybe some of you might at least know
where to find information on the Internet about this.

I am trying to code a little web-based jabber client with Mono. A
jabber library already exists that compiles and runs great with Mono,
so that will greatly simplify it all. Thanks guys !

However, I am looking for some information about the way things work
with ASP.NET.
Actually, the application will use a javascript PUSH method to send
trigger functions in the HTML webpage when a jabber event is received
on the server. This means I need to keep the connection alive. I tried
to do so using

Response.AppendHeader ("Connection", "keep-alive");
Response.AppendHeader ("Keep-Alive", "timeout=16, max=100");

in the Page_Load method of my page. However, when everything in this
method is done, the connection is still cut, and nothing is processed
anymore. If I add a Thread.Sleep(1000) at the end of Page_Load, then
the function that sends the "" events is triggered, and the
webpage receives it, so the function does work. I am wondering if any
of you guys has an idea about how to keep a connection alive with
ASP.NET in order to do javascript push.

Another question: if a Webforms control is already displayed on a web
page, and, while the connection is still alive, the data in this
control is modified, will ASP.NET send a javascript event to modify
its content ? In other words, can ASP.NET Webforms do the javascript
work for me ?

Thanks for your help, and sorry if I have been unclear. Tell me where
and I'll try to explain it better :-)

-- 
Alain Perry
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



joe_audette@yahoo.com
http://www.joeaudette.com
http://www.mojoportal.com
		
---------------------------------
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'
--0-264031564-1107463907=:91845
Content-Type: text/html; charset=us-ascii

<DIV>I don't think you should and probably can't keep a connection alive in a web page.</DIV>
<DIV>The web is a stateless environment you request a page, you&nbsp; get a page, you're done.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I would suggest you can make additional requests as needed inside an IFrame so the outer page is not refreshed but the page in the IFrame can carry on a dialog back and forth with the server using multiple requests.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Hope that helps,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Joe<BR><BR><B><I>Alain Perry &lt;alain.perry@gmail.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi list,<BR><BR>This is partly OT, but I thought maybe some of you might at least know<BR>where to find information on the Internet about this.<BR><BR>I am trying to code a little web-based jabber client with Mono. A<BR>jabber library already exists that compiles and runs great with Mono,<BR>so that will greatly simplify it all. Thanks guys !<BR><BR>However, I am looking for some information about the way things work<BR>with ASP.NET.<BR>Actually, the application will use a javascript PUSH method to send<BR>trigger functions in the HTML webpage when a jabber event is received<BR>on the server. This means I need to keep the connection alive. I tried<BR>to do so using<BR><BR>Response.AppendHeader ("Connection", "keep-alive");<BR>Response.AppendHeader ("Keep-Alive", "timeout=16, max=100");<BR><BR>in the Page_Load method of my page. However, when everything in this<BR>method is done, the
 connection is still cut, and nothing is processed<BR>anymore. If I add a Thread.Sleep(1000) at the end of Page_Load, then<BR>the function that sends the "
<SCRIPT>" events is triggered, and the<br>webpage receives it, so the function does work. I am wondering if any<br>of you guys has an idea about how to keep a connection alive with<br>ASP.NET in order to do javascript push.<br><br>Another question: if a Webforms control is already displayed on a web<br>page, and, while the connection is still alive, the data in this<br>control is modified, will ASP.NET send a javascript event to modify<br>its content ? In other words, can ASP.NET Webforms do the javascript<br>work for me ?<br><br>Thanks for your help, and sorry if I have been unclear. Tell me where<br>and I'll try to explain it better :-)<br><br>-- <br>Alain Perry<br>_______________________________________________<br>Mono-list maillist  -  Mono-list@lists.ximian.com<br>http://lists.ximian.com/mailman/listinfo/mono-list<br></blockquote></div></SCRIPT>
</BLOCKQUOTE><BR><BR>joe_audette@yahoo.com<br>http://www.joeaudette.com<br>http://www.mojoportal.com<p>
		<hr size=1>Do you Yahoo!?<br> 
Yahoo! Search presents - <a href="http://us.rd.yahoo.com/evt=30648/*http://movies.yahoo.com/movies/feature/jibjabinaugural.html">Jib Jab's 'Second Term'</a>
--0-264031564-1107463907=:91845--