locked
WCF - There was no channel actively listening RRS feed

  • Question

  • Hi! I have a project that uses WCF service. It works fine in my local, but when i host it in IIS and try to access the service if its function, it gives me an error.

    "There was no channel actively listening at http://mywebsite/myservice.svc. This is often caused by an incorrect address URI. Ensure that the address to which the message if sent matches an address on whicj a service is listening"


    my service config is as follows.

    <system.serviceModel>
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <behaviors>
       <serviceBehaviors>
        <behavior name="QuestionsBehavior">
         <serviceMetadata httpGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
       </serviceBehaviors>
      </behaviors>
     <services>
       <service behaviorConfiguration="QuestionsBehavior" name="Exam.Questions">
        <endpoint address="" binding="basicHttpBinding" contract="Exam.IQuestions" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
       </service>
      </services>
     </system.serviceModel>

    need help....
    Compiler
    Thursday, July 23, 2009 6:24 AM

Answers

  • Hi Compiler,

    Since the problem occurs after you deployed the WCF service(web hosted) to IIS server, there might has something wrong with the deployment.

    First, try using webbrowser to access an ASPX page or html page in the WCF service's deployment virtual directory. This can ensure whether the IIS virtual directory works correctly and http request can correctly access it.

    Regarding on the error message you received, I found an issue which pointed out a problem when you perform "precompile" on your website project when deploying to IIS:

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=300011

    Are you using "publish website" and deselect "allow site to be updatable" option? You can have a look at the above link to verify this.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, July 27, 2009 11:33 AM

All replies

  • Hi,

    The URL provided in the error message is ok, right?... Have you tried opening this URL in the browser (IE).... does it work?

    Regards,
    Rodrigo.
    Thursday, July 23, 2009 6:38 AM
  • i test the service in the url by typing the address (http://mywebsite/myservice.svc). When i try to access the button using that service, it gives me the same error.

    Compiler
    Thursday, July 23, 2009 6:41 AM
  • "There was no channel actively listening at http://mywebsite/myservice.svc. This is often caused by an incorrect address URI. Ensure that the address to which the message if sent matches an address on whicj a service is listening"

    Compiler
    Thursday, July 23, 2009 6:42 AM
  • Sorry, I didn't get the part of the button.... if you navigate to this URL in the browser it shows a test page... no issue there?.

    Regards,
    Rodrigo.
    Thursday, July 23, 2009 6:44 AM
  • What i mean is, I can log in into my project and go into the different parts of it. But when i go the Exam page(this page uses the service that i created), and click the start button(whic uses the service in the code), it gives me an error.


    Compiler
    Thursday, July 23, 2009 6:52 AM
  • Ok... but what I mean is that you don't run your application but open just the http://mywebsite/myservice.svc ... not from your application, just open IE and type this address... do you get an error page there? or just a test page?...

    Thanks,
    Rodrigo.
    Thursday, July 23, 2009 6:54 AM
  • Yes, i dont run the application, i just type the address of the service. And even when i run the application, it still gives me the same error.
    Compiler
    Thursday, July 23, 2009 6:56 AM
  • So... you just type this URL in the browser and it shows you an ASP.NET error page saying "The was no channel actively listening..." ?
    Thursday, July 23, 2009 7:02 AM
  • In our project, if thers an error, we dont display the error page. we have a custom error page. I get that error in the server log.
    Compiler
    Thursday, July 23, 2009 7:04 AM
  • Could you disable the custom error page temporarly?.... or enable WCF tracing?
    Thursday, July 23, 2009 7:05 AM
  • may i ask what for? because i think the error in the server log is the same as what might be displayed in the error page. I cannot also disble the custom error page because im accessing the service in live environment...
    Compiler
    Thursday, July 23, 2009 7:20 AM
  • any one else who can help me with this one...

    need help...


    Compiler
    Friday, July 24, 2009 2:24 AM
  • Hi Compiler,

    Since the problem occurs after you deployed the WCF service(web hosted) to IIS server, there might has something wrong with the deployment.

    First, try using webbrowser to access an ASPX page or html page in the WCF service's deployment virtual directory. This can ensure whether the IIS virtual directory works correctly and http request can correctly access it.

    Regarding on the error message you received, I found an issue which pointed out a problem when you perform "precompile" on your website project when deploying to IIS:

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=300011

    Are you using "publish website" and deselect "allow site to be updatable" option? You can have a look at the above link to verify this.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, July 27, 2009 11:33 AM
  • we are creating installer for the project, we are not using published websites.

    why is it the when i access the service using the local address in the server, http://<localname>/myservice.svc, it works, but when i try to access it using the public ip address http://<publi address>/myservice.svc, it gives me an error saying no channel listening.

    Compiler
    Wednesday, August 12, 2009 7:04 AM