HighTechTalks DotNet Forums  

TargetInvocationException when calling Activator.CreateInstance

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss TargetInvocationException when calling Activator.CreateInstance in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Naly
 
Posts: n/a

Default TargetInvocationException when calling Activator.CreateInstance - 11-07-2006 , 01:59 PM






Hello everyone,

I use an application to start and stop a service and get information
from the service. When the service is started, I use a client activated
object to exchange information with the service. When I stop the
service, I stop to renew the lease and assing my object to null. It
work fine the first time, but if I try to stop the service and start it
again, the service started, but I get a the following exception when
Activator.CreateInstance is called :

System.Reflection.TargetInvocationException was caught
Message="Exception has been thrown by the target of an invocation."
Inner Exception : IOException
Message="The write operation failed, see inner exception."
Inner Exception : SocketException
Message="An existing connection was forcibly closed by
the remote host"


If I wait about 10 seconds between the stop and start, it works fine.
Any idea? Do I have to release something else when I don't need a
remote object anymore?

Thanks


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.