Error "There was no channel actively listening" on HTTPS - wcf

So, I'm supporting in a WCF that is having some interesting problems. In the application log file, it has appeared the following error:
There was no channel actively listening at 'http://hostanme.domain/Integration/IntegrationService.svc'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening.
The case is that the application is configured to receive only requests in HTTPS, and if some external requests come with HTTP, it responds with a "404 Not Found". The point is that the error request up always comes HTTP and the hostname of the machine in the URL domain. We contemplated a lot here in the office whether it would be if the application calls this URL after the IIS recylce, but we are still on this question, and we can not repeat this error.
Has anyone had a similar situation , or know how to solve this case?

try to run this command :
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

Related

consuming WCF method via web service getting error only in IIS not in IDE

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.

Error 503 with WCF service

I've got a self-hosted WCF service listening on port 80. When I attempt to connect to it, I get a 503 Service Unavailable.
My WCF process is running, IIS is running. My URL ACLs are correct. Control never reaches my WCF process.
WCF tracing shows nothing more than:
Listen at 'http://localhost/Foo/Bar/'.
Nothing is shown in Failed Request Tracing, which is turned on correctly -- other tracing appears. The 503 Service Unavailable message is resolutely plain, implying that it's coming from kernel mode, rather than user mode.
I've turned on HTTP.SYS tracing, which shows that the namespace is reserved correctly:
Attempted to add URL (http://localhost:80/Foo/Bar/) to URL
group (0xFD0000014000002E). Status: 0x0.
But later, in the same trace, I see:
Request (request ID 0xF600000580000006) rejected
due to reason: UrlGroupLookupFailed.
I've tried iisreset a couple of times, but it doesn't help. I've also rebooted the PC; same problem.
What is going wrong? What else can I do to further debug this problem?
Updates
If I rename the URL (changing "Foo" to "Fizz", for example), then it works. Looks like corrupted configuration somewhere.
I have other services hosted in the same process that are bound to https://localhost/Foo/Bar/, and they appear to be working correctly.
It's not just WCF
I've had the same problem with a self-hosted Nancy service, and one of the commenters, below, reports the same thing with a self-hosted ServiceStack service.
Had the problem again. Poked around with URL ACLs. There were a couple of URL ACLs that could be considered to be ambiguous.
I had http://+:80/Foo/, http://+:80/Foo/Bar/ and http://localhost:80/Foo/Bar/. I deleted all except the 'localhost' one, and it started working.
Whether it was because of the ambiguity, or because deleting the extras caused something to be reset, I don't know...

There was no endpoint listening at http://169.254.2.2:8000/calculator/Calculator

I am getting the below errror when calliong WCF method from windows mobile.
There was no endpoint listening at
http://169.254.2.2:8000/calculator/Calculator that could accept the message. This is
often caused by an incorrect address
or SOAP action. See InnerException, if
present, for more details.
I am able to ping to mobile
Port # 8000 is enabled in my PC Firewall.
I used the basichttpbinding both PC and Mobile side.
Still i am not able to call method from WCF service.
I also got the error "There was no endpoint listening at 'x'" after working on with my client/server setup all morning. My firewall was off, so I tried a few things but nothing seemed to eliminate this problem. Finally I decided to restart my PC and that must have liberated the port. I believe that the port got hung up by me not closing the service connection properly before exiting the application. Anyway, restarting allowed me to connect to the same endpoint again with no further problems.

WCF client connection problem

I am consuming a web service in .NET application with WCF client.
The Endpoint's address of the service is over port 4338, and it is over HTTPS, secured with WS-Security standard.
So the address is something like :
https://[servername]:4338/[servicename]/
I was not able to communicate to the service with just running the application.
it gave me the following error :
Could not connect to [servername]:4338
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
[servername]:4338
But when I run Fiddler to investigate the http communication, the application start to work, and I will be able to communicate to the service.
As well, I want to add that I have a different service on the same web server that hosts the first service, and that second service's address is hosted on port 8080, and I am able to communicate with it with WCF client (without running Fiddler).
So, I googled and I found that it might be related to the proxy settings. Do you know what the problem is, and how can I solve it?
Thanks
Fiddler acts as an Internet proxy server. In general, any symptom of the form: "it works when I use Fiddler" means "it works when there's a (different) proxy server".
Check your proxy server settings. In particular, as empi suggested, try it in a browser. If it works there, it could be due to the fact that the browser has the proxy settings configured, and that you do not have them configured for WCF.
If you have proxy set in Internet Explorer, it may cause the problem. What happens when you open https://[servername]:4338/[servicename]/ in Internet Explorer?
Thanks empi for the reply.
I found the answer.
Actually in our company we have a proxy settings through "Automatic configuration script"
and depends on the web sites we are targeting internally, the script will point us to the proper proxy.
So, from the script I got the proper proxy address.
and in my .NET application I added this code
WebRequest.DefaultWebProxy = new WebProxy("http://xx.xx.xx.xx:8080");
and that fixed the problem
So WCF client was not detecting the setting of the automatic script.
and this is the reason it worked when I run Fiddler, because Fiddler listen to the http communication, and send it again through the settings.

unable to use WCF service in c# project - MetaData Error

Service Location:
http://1.1.1.1:5670/Test_Service/Service.SearchService.svc
Error:
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'http://mycompany.com/Test_Service/Service.SearchService.svc?xsd=xsd2'.
- The remote name could not be resolved: 'mycompany.com'
Metadata contains a reference that cannot be resolved: 'http://1.1.1.1:5670/Test_Service/Service.SearchService.svc?wsdl'.
There was no endpoint listening at http://1.1.1.1:5670/Test_Service/Service.SearchService.svc?wsdl that could accept the message.
This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
If the service is defined in the current solution, try building the solution and adding the service reference again.
This only happens when i am not on the VPN. If i am on the VPN things work well. Also mycompany.com is only availalbe internally.
I can view the WSDL when not connected to the VPN
Your VPN probably gives you an ip address in the 1.1.1.* subnet (internal to your company's network). So, when you are connected to VPN, you can reach the server and when you are not connected, you cannot (because you are outside the company's network without VPN).
There is likely no resolution to this issue unless your company is willing to expose that server externally. Just use your VPN.
Per comment: Yes and you can see the WSDL like this http://1.1.1.1:5670/Test_Service/Service.SearchService.svc?wsdl but you will need to be VPN'd in. :)