Hi,
I tried to simulate your problem in my machine. (win2000,office2003,visual
studio 2003).
I created a AddIn for outlook.
When the outlook opens this addin calls a webservice.
When I close the outlook, the outlook shutdowns properly.
Here is the addin code.
public void OnStartupComplete(ref System.Array custom)
{
localhost.Service1 serv1 = null;
try
{
serv1 = new localhost.Service1();
serv1.Timeout = System.Threading.Timeout.Infinite;
string str1 = serv1.HelloWorld();
System.Windows.Forms.MessageBox.Show(str1);
}
catch(Exception ee)
{
System.Windows.Forms.MessageBox.Show(ee.Message );
}
finally
{
if(serv1 != null)
{
serv1.Dispose();
}
}
}
Here is the sample webservice code.
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
I find nothing wrong in the code. Is there something wrong in the webservice
code?
Can you call the webservice from some other windows client successfully?
Regards,
R.Balaji
"David" <df*****@rochester.rr.com> wrote in message
news:OV*************@TK2MSFTNGP12.phx.gbl...
Hi All,
I am having trouble cleaning up after creating/calling my webservice
(WSE1.0) from COM Addin that I create for Outlook. If I shutdown Outlook
with using my webservice, Outlook shutsdown normally. If I call my
webservice then shutdown Outlook, Outlook doesnt shutdown properly and
still lingers in memory (seen in the task manager). Below is my code for calling
my webservice, is there anything I am doing wrong to clean up the
webservice, by the way, this is VB.NET, WSE 1.0, Windows XP, Office 2000
Dim proxy As MyWebService.MyProxy
Try
proxy = New MyWebService.MyProxy
If Not proxy Is Nothing Then
proxy.Timeout = System.Threading.Timeout.Infinite
proxy.Foo()
End If
Catch ex As Exception
DebugError(ex)
Finally
proxy.Dispose()
proxy = Nothing
End Try
Thanks for your help,
David