Hi!
I have a project for school (I'm in High School), and as a part of my project I need to make a simple Web Service. I have created 2 Web Services which contain just XML files, and then another Web Service, to which I connected the other 2 as Web References.
My problem is:
When using the 3rd Web Service for the first time, everything works correctly, but when I want to use it again, the following message appears:
"System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:5892
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at ShipAll.ShippingCenter1.ListOfShipment()
at ShippingAll.FindShipment(String city)"
The only solution I found so far is to competently delete the Web References and add them again, with the new address (localhost:... with a new port...)
I've tried to make the port static instead of dynamic, so that the port number will not change and thus the localhost:... address will not change either. But that didn't help me.
I've searched a lot and I have no idea what to do...
Thanks!