Unable to talk to self-hosted WCF Service - c#

Summary:
I noticed that one of the remote machines is not able to connect to this self-hosted WCF service.
Message: Error :System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://workflowclientservice.mmx.com/WorkflowClientService that could accept the message. This is often caused by an incorrect address or SOAP action.
The other remote machines are able to talk to the self-hosted WCF service.
Background:
I have a windows service called "Dispatcher Service" and this service is self-hosting some WCF services such as "Workflow Log Service", "Alert Service" and "Workflow Client Service"
I have another windows service called "Client Service" that is consuming these self-hosted WCF services. This windows service (Client Service) is installed on different remote machines. The client service installed on the remote machines are able to communicate to this self-hosted WCF service.
What I have already tried:
I have checked the firewalls and i don't see any issues on the client and the host.
In one of the remote machine (that is able to talk to the service), I opened up an ie browser on the machine and I was able to access the service through the website
In the problem remote machine (that is not able to talk to service), I was not able to reach the service at all in the browser.
I am trying to understand why one of the remote machine is not able to talk to this self-hosted service while other remote machines are able to talk to the service. I would like to try some steps to fix the issue.

Does your service expose a metadata endpoint? Have you tried using WcfTestClient to talk to the self-hosted WCF service? I would try this from the same machine as the service to being with

Related

WCF connection issue in windows xp

We have WCF service hosted as windows service in System1 [used NETTCP binding]
And we have client in system2 which has windows xp. It is working fine.
Issue: We have upgraded system1 to windows server 2016 and wcf service running as windows service. But from Windows xp, client couldnt even connect to WCF service.
Only in XP machine am facing issue:
"system.servicemodel.channels.servicechannel cannot be used for communication because it is in the faulted state"
Any configuration work in windows XP to support WCF in windows server 2016??
Kindly advise
Found this in msdn forum (it´s a bit older):
We have now found the problem. The application are starting some
services that WCF demands, the problem is that these services do not
exists on WindowsXP(WAS, NETTCP listener and so on). When the
application can´t find or start the service then the application will
close. Apparently it is not a requirement to have these services on
the client computer as long as it is not running the serivice(in IIS).
So when removing the service check from the client every thing seemse
to work fine.
- source

.Net WCF Web Service Can't Connect from Client to Remote server

I have a client that connects to a WCF web server using NetTCPBinding. I have having issues connecting to the WCF remotely from certain machines.
I can run this client from my other computer to the remote web service however I have a new machine and I cannot connect to the WCF service while running the same client from this machine and I can't figure out why since I have not changed anything in the clients on both machines, they are exactly the same.
I get the error
"The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue."
So my question is,
Is there anything on a system level that could be blocking my client from making the connection to the service?
Thanks

using HttpClient.GetAsync inside a service fabric service throws "unable to connect to remote service" exception

I am running service fabric in local cluster. And I use HttpClient.GetAsync to access https://google.com. Do I have to change any configuration to allow service fabric to talk to remote service?
Nope. If you can do it an a console app, you can do it in a Service Fabric service.
Question is more about connecting over HTTPS with HttpClient. See here: Make Https call using HttpClient
Or check your Internet connection.

Starting WCF Client in IIS

It is possible to have WCF Client that connects persistantly using duplex over net.tcp (netTcpBinding) from IIS?
i.e. the normal way would be to host it in a console app or as a windows service, my question is, could one use a shared hosting type of environment to run a WCF Client application.
i.e. the application isn't ever accessible from the outside, the application just connects to another service and consumes a remote WCF service over the internet.
If the ASP.NET app is the client, you could try loading the WCF Client into an Application or Session variable.
I've done something slightly similar with a System Timer and it worked a treat.

IIS Proxy for a Windows Service hosted WCF Service

I have a Windows Service that is exposing a WCF service thru a net.tcp channel.
Now I want this service to be exposed thru IIS, without being hosted in it. By doing that I will be able to maintain the state in the Windows Service, and I will benefit of the underlying IIS authentication and security.
Is it possible to do that just by using some configurations? Maybe a kind of proxy or passthrough?
UPDATE
Why am I doing that? A good question:
Some processes are running at a scheduled interval, asynchronously.
IIS is recycling AppPools and to trigger it, usually a web request should be issued, so that the AppPool is started.
I can't expose directly the service as a Web service in the Windows Service, because IIS is installed and binded to the IP Address that I want to use.
If I want to expose the service for many clients, using their own TLD, I don't want to have the same process running on each website (maybe for exclusive locks, or just for memory/CPU usage)
Perhaps this clarifies a little the need...
No you have to implement whole new layer in IIS. You will expose new WCF service which will call your WCF service hosted in Windows service. Is it really needed? Why don't you host the service in IIS directly or why don't you expose HTTP endpoint on your Windows service? What state do you maintain in Windows service?

Categories

Resources