I have an application developed in C # which consumes a webservice also in C #.
In some cases (it is not always and is not everywhere / clients) at the time of consuming webservice I get the following error:
Unable to connect to remote server
A connection attempt failed because the connected component did not respond correctly after a period of time or the established connection failed because the connected host did not respond meuip: 80
I already had problems with another error (which burst on the same line) that was:
Error description: The remote name could not be resolved: 'webservices.meusite.com'
But I managed to solve it just by repeating the attempt if there was an error.
The stacktrace shows the following:
em System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) em System.Net.HttpWebRequest.GetRequestStream() em System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) em Updater.WebServ.Servico.Metodo(Int32 Id) em Updater.TelaPrincipal.btTeste_click(Object sender, EventArgs e)
The most intriguing of all is that it does not matter how many times I try here, it never makes a mistake. The problem is only in some places.
What could be causing this?