我开发了一个小型wcf服务。它在Windows窗体应用程序中托管并启动该服务,并在端口1645处运行。以下是我的服务的app.config条目。WCF端口问题和代理创建
我的服务已启动,当我尝试创建代理把URL像的net.tcp://本地主机:1645 /的ChatServer/MEX然后我看到VS IDE不能够找到该服务,但我的服务在同一台电脑上运行。经过很多尝试,当我将端口从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>