我想在Windows 7,64位的IIS 7.5站点内使用net.tcp绑定托管WCF服务。可悲的是,该服务无法访问。实际上,使用telnet连接到TCP端口甚至失败。IIS托管的WCF服务与net.tcp绑定无法访问
下面是在web.config的网站我的system.serviceModel节的样子:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultServiceBehavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2000000" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="DefaultServiceBehavior"
name="FooService">
<endpoint binding="netTcpBinding" bindingConfiguration="service"
name="service" contract="IFoo" />
<endpoint binding="mexTcpBinding"
bindingConfiguration="DuplexBinding" contract="IFoo" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://127.0.0.1:9000/service"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="service" portSharingEnabled="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384" maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="None"/>
</binding>
<binding name="DuplexBinding">
<reliableSession enabled="true"/>
<security mode="None"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
在IIS管理器,我建立了一个网站有下的网络服务身份运行的应用程序池,与v4.0 .NET Framework和一个集成管道。该网站有一个绑定,其类型为net.tcp
,“绑定信息”设置为9000:*
。
在我的计算机服务下,我启动了以前停止的“Net.Tcp侦听适配器”和“Net.Tcp端口共享服务”服务,并使它们都自动启动。我还确保安装了“Windows Communication Foundation非HTTP激活”。
我还需要做些什么来获取IIS/WCF/WAS /无论在端口9000上监听,以便我的服务可以被激活和调用?
我的问题与Host WCF service with net.tcp binding through IIS Manager 7.5类似,但是OP没有注册,他的问题没有回答。我打开这个问题,所以我可以发布我自己的细节。
更新
,我发现了一些额外的线索。我决定添加第二个绑定,以便在尝试找出net.tcp问题的同时处理HTTP绑定。现在,当我尝试访问HTTP端点时,出现此错误
无法找到与具有绑定NetTcpBinding的端点的方案net.tcp相匹配的基地址。注册的基址方案是[HTTP]
我很清楚有绑定HTTP和这里的net.tcp:
<baseAddresses>
<add baseAddress="net.tcp://localhost:9000/"/>
<add baseAddress="http://localhost:8050/"/>
</baseAddresses>
所以把那句“已注册的基址方案”有我担心;有什么额外的我必须做的让我的网站支持net.tcp方案?
你想从客户那里得到什么URL? –
我已经尝试过'net.tcp://127.0.0.1:9000/service'和其他变体,但我想如果我甚至不能建立到端口9000的连接,我的问题不在于URL。 – Jacob
尝试net.tcp://127.0.0.1:9000 /服务/服务 –