While accessing the WCF service method , I received the following error
"There was no endpoint listening at
http://ABC:1062/MyService.svc
that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
The inner exception is
"Unable to connect to the remote server"
"No connection could be made because the target machine actively refused it "
Please help
Related
I have a windows service running every 3 minutes. At the start, this service hits a static URL that which returns "success". We are using WebClient.OpenRead(URL) for getting the result.
This is working fine in most machines. In one particular machine I am getting the following exception:
System.Net.WebException: The underlying connection was closed:
Could not establish trust relationship for the SSL/TLS secure channel. --->
System.Security.Authentication.AuthenticationException:
The remote certificate is invalid according to the validation procedure.
I moved this function alone to a separate exe and it was working fine. But when the same runs as a service, I am getting the mentioned exception. Any help would be much appreciated.
I am using token based authentication for calling netsuite restlets from my .Net WebAPIs.
It has been working well, but since yesterday I started getting this below error on Netsuite sandbox. I don’t see any code change that could have resulted to this. Can anyone point me to the right direction?
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Probably a TLS issue as their sandbox has removed TLS 1.0/1.1
https://stackoverflow.com/a/46944838/266509
I figure that you probably are looking for a Netsuite / Suitescript specific answer but in-case it helps, the following is a thread on the exception string you are reading:
An existing connection was forcibly closed by the remote host
I have a WCf service which calls an external restfull service. I have deployed WCF service in windows service environment and i am able to run windows service locally and it worked fine, but when i deploy service in windows server. It gives below error.
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 174.143.127.78:443
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, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
Is there anything that needs to be configured on server? Any clue why it worked locally but not on server
OK, the key information in your error message is "connection attempt failed", which tells us that your client never reached the host and then timed out.
So the first thing I'd check is the firewall settings on the host. Your URL (listed in your error message) says you're trying to reach the service on 443 (normally for SSL). Make sure your server has that port open for in and out traffic. BTW, even if you're using SSL in your communication, you don't need to use 443 as your port. You can use any port you want within the range allowed.
If that doesn't work, I'd get a copy of Fiddler running on my client and try again, letting Fiddler act as a middleman proxy to capture and log the information going back and forth. That's usually a good way to debug WCF communication problems.
Also, the easiest way to check whether a web service is reachable is to simply type the URL (format is: http: //servername:port/ServiceName/ServiceMethod) into any browser address bar and hit enter. Doing that will contact the web service and, if you get a WSDL message back, you know you have the right address and that communication can commence.
Good luck. If this answers the question, don't forget to mark it as such.
The server where your service is hosted is trying to communicate with 174.143.127.78:443. That's probably where your RESTful service is deployed. You will have to work with your IT to open ports on these boxes so they can communicate with each other. If that can't be done, try seeing if you can host both your services on the same box.
I created a WCF service. It worked well yesterday. When I entered service address, I got message returned as expected. However, when I run it today, I received error message:
In IE: [Fiddler] The socket connection to localhost failed.
ErrorCode: 10061. No connection could be made because the target machine actively refused it [::1]:47423
In Firefox: Firefox can't establish a connection to the server at the site
In Fiddle2: HTTP: 502
How to solve this problem? Thanks.
Generally with these issues is either the service is not running or you're url is incorrect. Without more specific information it's impossible to tell.
I have added http://ws.hipcricket.com/api/EndUser.svc as a service reference in a my web service. I am able to consume the methods from the IDE but while hosting the same in IIS I'm getting the following errors:
Error 1:
Could not connect to the (please refer the above url). TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 69.20.116.221:80.
Error 2:
There was no endpoint listening at (please refer the above url) that could accept the message. This is often caused by an incorrect address or SOAP action. See Inner Exception, if present, for more details
Maybe you have a firewall blocking communication from your webserver? When developing on your local machine communications through the proxy may most likely be using your credentials, while the user that the application pool that your application is running under on your IIS server most probably does not have the correct rights.