工作,下面是我的app.config麻烦WCF与NetTcpBinding的
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="Indexer">
<endpoint address="net.tcp://localhost:8000/Indexer/" binding="netTcpBinding"
bindingConfiguration="TransactionalTCP" contract="Me.IIndexer" />
</service>
<service name = "Indexer" behaviorConfiguration = "MEXGET">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8000/"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name = "MEXGET">
<serviceMetadata httpGetEnabled = "true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="TransactionalTCP"
transactionFlow="true"
/>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
出于某种原因,我不能去,我运行此机器上的WCF服务。 任何一个可以发现错误?我有netTcpBinding服务启动并运行。
当我有同样运行在HTTP它是工作的罚款与以下config文件
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="IndexerServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8080/Indexer/"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Indexer" behaviorConfiguration="IndexerServiceBehavior">
<endpoint address="http://localhost:8080/Indexer/" binding="basicHttpBinding"
bindingConfiguration="" name="HTTP" contract="IIndexer" />
<endpoint address="http://localhost:8080/Indexer/MEX/" binding="mexHttpBinding"
bindingConfiguration="" name="MEX" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
</configuration>
我真的不能找出我在做什么错..
是的,我已经这样做了:-) – Matt 2009-08-28 03:47:17
我只说了,因为它花费了我大约二十分钟的那一天:) – spender 2009-08-28 03:52:44
啊你没有mex端点,当你在visual studio中添加服务引用时,你能只要给它net.tcp地址? – Matt 2009-08-28 04:03:09