小さな wcf サービスを開発しました。これは、Windows フォーム アプリでホストされ、サービスを開始し、ポート 1645 で実行されます。ここに、私のサービスの app.config エントリがあります。
私のサービスが開始され、net.tcp://localhost:1645/ChatServer/mexのような URL を入れてプロキシを作成しようとすると、VS IDE がサービスを見つけることができませんが、私のサービスは同じ PC で実行されています。ポートを 1645 から 7999 に変更して何度も試した後、プロキシが作成されていることがわかりました。そのため、ポートが1645のときにサービスが検出されず、ポートを変更した瞬間に機能し始めたことを非常に混乱させています。ポートに関連する問題があった場合、サービスはポート 1645 でどのように開始されましたか? 実際の問題が何であるかを理解できませんでした。誰もが以前にこの種の問題に遭遇したので、1645 のポート関連の問題を教えてください。
プロキシの作成に繰り返し失敗した結果、ポート 1645 で何が問題になったのか誰か教えてください。ポート 1645 のポート関連の問題を診断するのに役立つツールはありますか? ありがとう
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="WCFService.Service" behaviorConfiguration="behaviorConfig">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:1645/ChatServer/"/>
<add baseAddress="http://localhost:1648/ChatServer/"/>
</baseAddresses>
</host>
<endpoint address="tcp"
binding="netTcpBinding"
bindingConfiguration="tcpBinding"
contract="ChatService.IChat"/>
<endpoint address="net.tcp://localhost:1645/ChatServer/mex"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="behaviorConfig">
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="tcpBinding"
maxBufferSize="67108864"
maxReceivedMessageSize="67108864"
maxBufferPoolSize="67108864"
transferMode="Buffered"
closeTimeout="00:00:10"
openTimeout="00:00:10"
receiveTimeout="00:20:00"
sendTimeout="00:01:00"
maxConnections="100">
<security mode="None">
</security>
<readerQuotas maxArrayLength="67108864"
maxBytesPerRead="67108864"
maxStringContentLength="67108864"/>
<reliableSession enabled="true" inactivityTimeout="00:20:00"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>