0

I am working on silverlight application.

I want to update a table field when user exit from silverlight application.

For this I have used below Wcf service in Application_Exit method

  private void Application_Exit(object sender, EventArgs e)
        {
             objProxy.SessionUpdateFieldsCompleted += objProxy_SessionGetUserCompleted;
             objProxy.SessionGetUserAsync();    

        }

But Wcf is not called here.

Is there any way to do this?

Thanks, Hitesh

1 Answer 1

1

You can't call async operations on Application_Exit, because it exits before being processed from the queue. The closest you can do is have the user click something to close the app and run your code there. I know it sucks but it is what it is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.