由网友(星星)分享简介:下面是我的app.config Below is my app.config下面是我的app.config
Below is my app.config
<?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的服务和运行。
For some reason, I cannot get to the WCF service on the machine where I run this. Can any one spot the error? I have netTcpBinding service up and running.
在我有同样运行在HTTP这是工作的罚款与以下config文件
When I had the same running in HTTP it was working fine with the following .config file
<?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>
我真的不能找出我做错了。
I can't really figure out what I'm doing wrong..
推荐答案
您,当然,打开了防火墙,让它听?
You have, of course, opened up the firewall to let it listen?
如果它的任何使用,这里的结合我成功地用不是很久以前:
If it's any use, here's the binding I successfully used not so long ago:
<services>
<service name="MyService.MySearch" behaviorConfiguration="ServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://mypc:8003/MyService"/>
</baseAddresses>
</host>
<endpoint bindingConfiguration="Binding1"
binding="netTcpBinding"
contract="MyService.IMySearch"
address="net.tcp://mypc:8004/MyService" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="Binding1"
hostNameComparisonMode="StrongWildcard"
sendTimeout="00:10:00"
maxReceivedMessageSize="65536"
transferMode="Buffered"
portSharingEnabled="false">
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="None" />
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
</behaviors>
有上没有安全性这一具有约束力。
There's no security on this binding.
相关推荐
最新文章