Reputation: 1093
I have a WCF service deployed behind the load balancer, when I try to reach it with SOAP it works great, but when I try to reach it via REST url I get the below mentioned error.
This is the REST URL I try to reach it with https:// devreporting.dev.sample.com/ReportingManagement.svc/getAddtionsByCategory..
The load balancer VIP is https:// devreporting.dev.sample.com and there is only one server behind the firewall which is dev01
I believe this is some problem with the host headers, but not sure how to fix this. Any ideas would be greatly appreciated.
Message: WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/12646224
Exception:
System.Web.HttpException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'.
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. --->
System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'.
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.
at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
Process Name: w3wp Process ID: 4760
Upvotes: 5
Views: 16551
Reputation: 1211
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="Service" behaviorConfiguration="ServiceBehaviour">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="webMyAcc" bindingConfiguration="TransportSecurity" contract="IService"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webMyAcc">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<client />`enter code here`
</system.serviceModel>
Upvotes: 0
Reputation: 1093
Phew...I was missing the security configuration in my section, when I added it, things worked like charm
<webHttpBinding>
<binding name="CommerceRESTBinding">
<security mode="Transport">
<transport clientCredentialType = "None" proxyCredentialType="None"/>
</security>
</binding>
</webHttpBinding>
Upvotes: 12
Reputation: 161783
"No channel actively listening" sounds like what it says. There was nothing listening to port 17005 at the time the request was made.
Make sure that's the correct URL. Test it by issuing the following command from a Command Prompt window on the server machine:
telnet localhost 17005
Enter
GET /
Enter ;Note: this will not echo
Enter
If this works (connects and brings back something from IIS), then run the same test from a client machine on the far side of the load balancer. Of course, in that case, use the full host name instead of localhost
.
Upvotes: 0