'There was no channel actively listening at wcf
I have been working on a WCF service which is developed in VS 2008 and hosted in Windows Server 2008, IIS 7.0, When I host this service in my local environment, its working fine but when i host this service in production site its not working. In this service i am using WShttpbinding binding, and i am using the Security mode is message and clientcredential type is "Username"
<security mode= "Message">
<message clientCredentialType="UserName" />
</security>
In behaviour configuration i am using the
<behavior name="name">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpsGetUrl="https://serviceurl/basic"/>
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<serviceCertificate findValue="CN=WMSvc-AMAZONA-PJ1K606" />
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider" embershipProviderName="WCFSqlProvider" />
</serviceCredentials>
</behavior>
but when i consume the service from my client application it gives me the error
There was no channel actively listening at "//name of the machine where service hosted/servicename/$metadata" 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.
Solution 1:[1]
Looks like your problem is with the metadata, according to the error message.
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpsGetUrl="//https://serviceurl/basic"/>
Try removing the // in the beginning of httpsGetUrl attribute, they might be causing you trouble.
Here are a few examples of configurations: http://msdn.microsoft.com/en-us/library/ms731317(v=vs.110).aspx
Solution 2:[2]
<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 />
</system.serviceModel>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Tewr |
| Solution 2 | Tamilselvan K |
