I have made a soap connection to a server and the server does not seem to leave the connection, the connection closed in netstat status Stop as listed.
I have been told that the customers who have made soap connections should send a command to the server to close the connection. Can anyone tell me the correct way to do this in C #? Below is an example piece of code.
SOAPServer.Service SOAP = new SOAPServer.Service (); // SOAPServer is a web reference soap.Timeout = 30000; String [] SOAPReturnResult = Soap. Depot Data (100, "Test"); Soap.Dispose ();
Wrap it in a block.
(SOAPServer.Service using soap = new SOAPServer.Service ()) (Soap.Timeout = 30000; string [] SOAPReturnResult = Soap.DepotData (100, "Test");}
Note that this only marks the connection as closed. Even after the connection has closed, it may still be open through NetState for a short time.
Comments
Post a Comment