<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Grab when the browser shuts down</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Grab when the browser shuts down</description>
  <pubDate>Sun, 12 Apr 2026 01:35:42 -700</pubDate>
  <lastBuildDate>Wed, 10 Nov 2010 15:34:43 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2286</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Grab when the browser shuts down : tj62,  I&amp;#039;ve looked around...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9068#9068</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2286<br /><strong>Posted:</strong> 10-Nov-2010 at 3:34pm<br /><br /><P>tj62, </P><DIV>I've looked around and it seems it's not possible.</DIV><DIV>&nbsp;</DIV><DIV>As per MS Documentation:&nbsp;(<a href="http://msdn.microsoft.com/en-us/library/system.windows.applicati&#111;n.exit%28v=VS.95%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.windows.application.exit(v=VS.95).aspx</A>)</DIV><DIV>&nbsp;</DIV><DIV><EM>An Exit event handler should not include long-running, <strong>re-entrant</strong>, or cyclic code, ...</EM></DIV><DIV><EM></EM>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;&nbsp; Silvio.</DIV><span style="font-size:10px"><br /><br />Edited by sbelini - 10-Nov-2010 at 4:14pm</span>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 15:34:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9068#9068</guid>
  </item> 
  <item>
   <title>Grab when the browser shuts down : Thank you sbelini,  Just one...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9058#9058</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2286<br /><strong>Posted:</strong> 10-Nov-2010 at 9:16am<br /><br />Thank you sbelini, <DIV>Just one question. The logout is performed asynchronously, so as I'm closing the applicatoin I do not have any means of waiting for the logout callback to be called.&nbsp; Is it possible to somehow force the application to wait for the callback .... or is it secured that the LogoutAsync() will go through to the server before the application shuts down?</DIV><DIV>&nbsp;</DIV><DIV>The below call "persistenceGateway.Logout(null)" will call <BR>&nbsp; <FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>p_manager.LogoutAsync(null,null);</FONT></FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: blue">private</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">void</SPAN><FONT color=#000000> Application_Exit( </FONT><SPAN style="COLOR: blue">object</SPAN><FONT color=#000000> sender , </FONT><SPAN style="COLOR: #2b91af">EventArgs</SPAN><FONT color=#000000> e )<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><FONT color=#000000>{<o:p></o:p></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: blue">&nbsp;&nbsp;&nbsp; var</SPAN><FONT color=#000000> persistenceGateway = m_bootstrapper.Container.Resolve&lt;</FONT><SPAN style="COLOR: #2b91af">IPersistenceGateway</SPAN><FONT color=#000000>&gt;();<o:p></o:p></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;i</FONT></SPAN><SPAN style="COLOR: blue">f</SPAN><FONT color=#000000>(persistenceGateway.p_isLoggedIn)<o:p></o:p></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><FONT color=#000000><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>persistenceGateway.Logout(</FONT><SPAN style="COLOR: blue">null</SPAN><FONT color=#000000>); // I set callback to null, as I do not know how to wait for it<o:p></o:p></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><FONT color=#000000>}<o:p></o:p></FONT></SPAN></P><P></FONT></FONT></FONT></P></DIV>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 09:16:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9058#9058</guid>
  </item> 
  <item>
   <title>Grab when the browser shuts down : Hi tj62,  You can use the Application...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9048#9048</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2286<br /><strong>Posted:</strong> 09-Nov-2010 at 12:14pm<br /><br />Hi tj62,<DIV>&nbsp;</DIV><DIV>You can use the Application Exit event (in the App.xaml.cs file).</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;&nbsp; sbelini.</DIV>]]>
   </description>
   <pubDate>Tue, 09 Nov 2010 12:14:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9048#9048</guid>
  </item> 
  <item>
   <title>Grab when the browser shuts down : Is it possible in the Silverlight...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9033#9033</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2286<br /><strong>Posted:</strong> 08-Nov-2010 at 7:57am<br /><br /><P>Is it possible in the Silverlight Client code to somehow grab when the user closes the hosting browser (or browser page)? </P><DIV>I need this to do some cleenup work like saving to the database display states, etc.<BR>I also wnat to do a logout to free&nbsp; resources on the server side that otherwise&nbsp;times out, if I have understood things right.</DIV>]]>
   </description>
   <pubDate>Mon, 08 Nov 2010 07:57:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2286&amp;PID=9033#9033</guid>
  </item> 
 </channel>
</rss>