468,278 Members | 1,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,278 developers. It's quick & easy.

HELP with WSE clean up

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
Nov 21 '05 #1
1 1974
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

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jo | last post: by
1 post views Thread by wukexin | last post: by
16 posts views Thread by expertware | last post: by
1 post views Thread by audiopro | last post: by
3 posts views Thread by BobAtUnisys | last post: by
4 posts views Thread by rsaharia | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.