You could try this:
But I haven't validated to check if this works, it could fail because the 2 servicehosts are both active. Why do you need the recreate the service anyway?Code:Dim myService As MyServiceHost = New MyServiceHost() myService.Open() Dim newService As MyServiceHost = New MyServiceHost() newService.Open() myService.Close()




Reply With Quote