none
The type or namespace name 'CalculateClient' does not exist in the namespace RRS feed

Answers

  • Hi,

    After the service is running, you should open a new visual studio which run as administrator and create a new console project. You should make sure it is separate from the host console project. And the service is running all the time.

    Then you can click the add the service reference, in the service address, please enter net.tcp://localhost:8243/mex , then click go, then I think you can find the service.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ardmore Monday, September 16, 2013 12:58 PM
    Monday, September 16, 2013 12:40 AM
    Moderator

All replies

  • Hi,

    I have test your solution. And I found you used the following:
    DemoService.GetHeadersClient proxy = new DemoService.GetHeadersClient("TcpIGetHeaders");

    But in your client endpoint configure file:

    <client>
                <endpoint address="http://localhost:8731/Design_Time_Addresses/DemoService/HeaderService/" binding="wsHttpBinding" bindingConfiguration="WsIGetHeaders" contract="DemoService.IGetHeaders" name="WsIGetHeaders">
                </endpoint>
              <endpoint address="net.tcp://localhost:8731/Design_Time_Addresses/DemoService/HeaderService/" binding="netTcpBinding" bindingConfiguration="TcpIGetHeaders" contract="DemoService.IGetHeaders" name="TcpIGetHeaders7">
              </endpoint>
            </client>


    I did not see that endpoint name TcpIGetHeaders in client side. But I found the TcpIGetHeaders is the endpoint name in the service side.

    So I change the TcpIGetHeaders as TcpIGetHeaders7:
    DemoService.GetHeadersClient proxy = new DemoService.GetHeadersClient("TcpIGetHeaders7");

    Then I got the application works.

    Please remeber this:
    The parameter should be the client endpoint name not the service endpoint name.

    For more information, please try to refer to:

    #Multiple Endpoints:
    http://msdn.microsoft.com/en-us/library/ms751515.aspx .

    Best Regards,
    Amy Peng




    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Friday, September 6, 2013 2:12 AM
    Moderator
  • You missed my point, my question is not how the endpoint name matches the code. I have an exception, please see my image.

    Friday, September 6, 2013 1:08 PM
  • Hi,

    I am sorry for my late reply. And it seems that you have updated your folder in the skydrive.

    I have changed your service side configure file as below:

     <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="mg">
              <serviceMetadata httpGetEnabled="false"/>
            </behavior>
                      
          </serviceBehaviors>
        </behaviors>
        <bindings>
          <netTcpBinding>
            <binding name="TcpIGetHeaders" />
            <binding name="TcpICalculate" />
          </netTcpBinding>
          <wsHttpBinding>
            <binding name="WsIGetHeaders" />
            <binding name="WsICalculate" />
          </wsHttpBinding>
        </bindings>
        <services>
          <service name="DemoService.HeaderService" behaviorConfiguration="mg">
          <endpoint address="DemoService/TcpIGetHeaders" binding="netTcpBinding"
              bindingConfiguration="TcpIGetHeaders" contract="DemoService.IGetHeaders"
              name="TcpIGetHeaders" />
          <endpoint address="DemoService/TcpICalculate" binding="netTcpBinding"
             bindingConfiguration="TcpICalculate" contract="DemoService.ICalculate"
             name="TcpICalculate" />
          <endpoint address="http://localhost:8241/DemoService/sss" binding="wsHttpBinding"
             bindingConfiguration="WsICalculate" contract="DemoService.ICalculate"
             name="WsICalculate" />
            <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
             contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:8243/" />
              </baseAddresses>
            </host>
          </service>
        </services>
      </system.serviceModel>

    Then it work in my side.

    The following article may help you, please try to refer to:

    #Multiple Service Contracts in WCF Service:
    http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/multiple-service-contracts-in-wcf-service/ .

    Best Regards,
    Amy Peng




    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 12, 2013 4:56 AM
    Moderator
  • Would you mind upload the solution in somewhere? I didn't get it. Still wrong.
    Thursday, September 12, 2013 12:56 PM
  • Hi,

    Because my client's configure file includes some infomration about my domain, so I have only upload my service in: http://sdrv.ms/15oJ1vl .
    Please download it, then make sure the service is runing, then you can create a client to discover the service by enter the address: net.tcp://localhost:8243/mex .

    After adding the services reference, your client code should work.

    The soluiton work well in my side.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, September 13, 2013 3:45 AM
    Moderator
  • Sorry my very silly question, I downloaded your solution. I need baby steps.

    What I did was,Make sure "Host" solution is the start up project and run it. A window pop out saying "Opening". I thought that the service was running. Then I created a console project "TestClient", right click to add a service reference. It was greyed out.

    Friday, September 13, 2013 1:18 PM
  • Hi,

    After the service is running, you should open a new visual studio which run as administrator and create a new console project. You should make sure it is separate from the host console project. And the service is running all the time.

    Then you can click the add the service reference, in the service address, please enter net.tcp://localhost:8243/mex , then click go, then I think you can find the service.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ardmore Monday, September 16, 2013 12:58 PM
    Monday, September 16, 2013 12:40 AM
    Moderator