Web Method Asynchronous calls

Add-in Express™ Support Service
That's what is more important than anything else

Web Method Asynchronous calls
 
nfsadx




Posts: 56
Joined: 2006-07-21
Hi,

I am doing the following:
-have an adxolform calling a void method on a c# class.
-the method calls a BeginXX method on a web service proxy.
-outlook then hangs even though the web method has returned (i can see by setting breakpoints in the async callback method)

it also hangs when i run outlook without vs2003 running.

As anybody tried this?
Posted 26 Jul, 2006 10:04:21 Top
Sergey Grischenko


Add-in Express team


Posts: 7216
Joined: 2004-07-05
Hi Harry.

Do you call the Dispose method the web proxy object before Outlook closes?
Posted 27 Jul, 2006 08:57:08 Top
nfsadx




Posts: 56
Joined: 2006-07-21
Hi Sergey,

I should have been more clear in my initial post.
-outlook then hangs even though the web method has returned
i meant control goes back to the outlook form but hangs. I think it is because I am trying to update the UI as a result of the async callback method which is the wrong way to do it. I will look at it again later on but if you have ever tried updating a UI from an async callback then please let me know the trick.
Posted 27 Jul, 2006 09:12:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7216
Joined: 2004-07-05
Harry, I have never tried to update the UI in the async callback method but I think you can use the SendMessage method of the addinmodule.
E.g. you can send a message to the add-in internal window via the SendMessage method and update the UI in the OnSendMessage event handler of the addinmodule when the message comes in.
Posted 27 Jul, 2006 09:52:18 Top