none
Services not showing up in Test Client RRS feed

  • Question

  • I will apologize up front for this being a simple question. I've been beating my head against a wall trying to figure this out.

    In my project, I have the default service that is created when you create a new WCF class library - Service1.  I left that in place, and added an additional service to reference the code I actually want to use.  Both services are showing in the Service Configuration Editor, but when I run the project, only the original service shows up (DBOServer.Service1 - not my new service (named DBOServer.Displays).  I am pasting my app.config file below.  Any help would be greatly appreciated.

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    
      <system.web>
        <compilation debug="true" />
      </system.web>
      <!-- When deploying the service library project, the content of the config file must be added to the host's 
      app.config file. System.Configuration does not support config files for libraries. -->
      
      <system.serviceModel>
        <services>
          <service behaviorConfiguration="TestBehavior" name="DBOServer.Service1">
            <endpoint address="" binding="basicHttpBinding" contract="DBOServer.IService1">
              <identity>
                <dns value="localhost" />
              </identity>
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" name="mexBinding"
              contract="IMetadataExchange" />
            <endpoint address="net.pipe://localhost/testNamedPipeService1"
              binding="netNamedPipeBinding" bindingConfiguration="" name="namedPipe"
              contract="DBOServer.IService1" />
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:8733/Design_Time_Addresses/DBOServer/Service1/" />
              </baseAddresses>
            </host>
          </service>
          <service behaviorConfiguration="TestBehavior" name="DBOServer.Displays">
            <endpoint address="" binding="basicHttpBinding" contract="DBOServer.Displays.IDisplays">
              <identity>
                <dns value="localhost" />
              </identity>
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" name="mexBinding"
              contract="IMetadataExchange" />
            <endpoint address="net.pipe://localhost/testNamedPipeDisplays"
              binding="netNamedPipeBinding" bindingConfiguration="" name="namedPipe"
              contract="DBOServer.Displays.IDisplays" />
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:8733/Design_Time_Addresses/DBOServer/Displays/" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="TestBehavior">
              <!-- To avoid disclosing metadata information, 
              set the value below to false before deployment -->
              <serviceMetadata httpGetEnabled="True"/>
              <!-- To receive exception details in faults for debugging purposes, 
              set the value below to true.  Set to false before deployment 
              to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
    
    </configuration>
    

    Tuesday, August 12, 2014 9:35 PM

Answers

  • Hi,

    I have test your project, and you have used the following:

    <service behaviorConfiguration="TestBehavior" name="DBOServer.Displays">

    But your service name is DBOServer.Displays.DisplaysService, so you have mismatched the service name, please try to modify it as following:

     <service behaviorConfiguration="TestBehavior" name="DBOServer.Displays.DisplaysService">

    Then it should work.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by MattFielder Thursday, August 14, 2014 6:49 AM
    Thursday, August 14, 2014 4:49 AM
    Moderator

All replies

  • Hi,

    I just create a simply example, then I copy your config file to my side, then I use the WCF Test Client to test the services. But it works well in my side as following:

    So could you please tell me what error do you meet? or you can upload your project here, then I want to have a  test in my side.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 13, 2014 3:27 AM
    Moderator
  • Amy - thanks for your help.

    When I run the project, I only see one service project - the one with the IService1 implementation.  The that links to the implementation of IDisplays doesn't show up.

    I stripped down the project to the minimum and have placed it here: https://onedrive.live.com/redir?resid=F8046D0F5C7E17E%21193

    Wednesday, August 13, 2014 7:44 AM
  • Hi,

    I have test your project, and you have used the following:

    <service behaviorConfiguration="TestBehavior" name="DBOServer.Displays">

    But your service name is DBOServer.Displays.DisplaysService, so you have mismatched the service name, please try to modify it as following:

     <service behaviorConfiguration="TestBehavior" name="DBOServer.Displays.DisplaysService">

    Then it should work.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by MattFielder Thursday, August 14, 2014 6:49 AM
    Thursday, August 14, 2014 4:49 AM
    Moderator
  • Thank you very much. I didn't realize the name of the service was directly related to the name of the class. I think it didn't occur to me because the name of the interface is designated in the contract value of the endpoint, but when thinking about it - the fact the class name is required makes sense since more than one class can implement the same interface.
    Thursday, August 14, 2014 6:52 AM