0
我有一个关于主机app.config文件的配置配置WCF主机servce
比方说,我主持我的WCF服务在PC上,它的IP是一个基本的问题:123.456.789.001:9999
这是我的app.config文件:
<configuration>
<services>
<service name="Service.WebexClient" behaviorConfiguration="MyServiceTypeBehaviors" >
<host>
<baseAddresses>
<add baseAddress="http://<What should I put here>:9999/MyWebexService"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors" >
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://<And What should I put here>:9999/MyWebexService/Help"/>
</behavior>
</serviceBehaviors>
</behaviors>
我想知道什么是正确的参数,我应该插入baseAddress和httpGetUrl。我很困惑。我应该在那里放置“localhost”还是ip(123.456.789.001)?
我不这是正确的做到这一点:HTTP://123.456.789.001:9999/MyWebexService? wsdl问:在排队的应用程序上调用ServiceHost.Open()会引发以下异常:System.ArgumentException:基地址不能包含URI查询字符串。为什么? A:检查配置文件和代码中的队列URI。虽然MSMQ队列支持使用'?'字符,URI将该字符解释为字符串查询的开始。为避免此问题,请使用不包含'?'的队列名称字符。 – MoShe 2012-02-15 10:19:56
第一个问题 - 你使用MsmqBinding吗?如果你是,为什么你使用http:作为地址的协议? – Tim 2012-02-15 19:27:24
不,我正在使用basick http – MoShe 2012-02-17 13:21:06