System.ServiceModel.EndpointNotFoundException

KwebenaAcquah-9104 306 Reputation points
2022-05-02T04:47:45.313+00:00

i am having a connection problem with my server.
![![198008-capture.png]1]1

MY CODE CONFIGURATION FOR SERVICE (SERVER SIDE)
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<system.serviceModel>
<services>
<service name="ChattingServer.ChattingService">
<endpoint address="net.tcp://localhost:8000/ChatService" binding="netTcpBinding"
bindingConfiguration="" name="Chat Service EndPoint" contract="ChattingServer.IChattingService" />
</service>
</services>
</system.serviceModel>
</configuration>

MY CODE CONFIGURATION (CLIENT SIDE)

 </startup>  
  <system.net>  
    <defaultProxy>  
      <proxy usesystemdefault="False"/>  
    </defaultProxy>  
  </system.net>  
    <system.serviceModel>  
        <client>  
            <endpoint address="net.tcp://localhost:8000/ChatService" binding="netTcpBinding"  
                bindingConfiguration="" contract="ChattingInterfaces.IChattingService"  
                name="ChatServiceEndPoint" kind="" endpointConfiguration="" />  
        </client>  
    </system.serviceModel>  

please some one; i know some one her can salvage me her on how to do the right thing; i can't log into the server, please any help will be highly appreciated. thanks

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,988 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,129 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 30,071 Reputation points Microsoft Vendor
    2022-05-02T07:25:10.697+00:00

    Hi @KwebenaAcquah-9104 ,
    By default, Windows does not enable port sharing.
    I recommend you to check that it's enabled correctly as well as check your IIS web application to make sure the enabled protocols include net.tcp.
    You can try adding portSharingEnabled="true" to the binding:

    <system.serviceModel>  
      <bindings>  
        <netTcpBinding name="portSharingBinding"   
                       portSharingEnabled="true" />  
      <services>  
        <service name="MyService">  
            <endpoint address="net.tcp://localhost/MyService"  
                      binding="netTcpBinding"  
                      contract="IMyService"  
                      bindingConfiguration="portSharingBinding" />  
        </service>  
      </services>  
    </system.serviceModel>  
    

    Your code does not provide binding information, maybe you can refer to the documentation for how to write it.
    Default NetTcpBinding
    Net.TCP Port Sharing
    Configuring WCF Services Using NetTcpBinding
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.