views:

889

answers:

1

When the user closes the browser that hosts my Silverlight 2 Application I need to call a web service that would log the user out. I am aware of the Application_Exit event, however when I call my service in that event nothing happens. I presume that the connection to my service is already closed by then.

Is there another event that I should use?

Please help.

+1  A: 

Don't do it. Calling a service at application exit is not supported by Silverlight. You need the service to clean itself up, possibly with the application telling the service every few minutes/hours as appropriate tto delay the cleanup. Link to Silverlight Forums and the same question

Graeme Bradbury
The link is broken - this appears to be the correct one: http://forums.silverlight.net/forums/t/20279.aspx
Christopher Scott