读书人

关于WCF服务的有关问题

发布时间: 2012-02-24 16:30:39 作者: rapoo

关于WCF服务的问题

<!--QuotationPrinterService-->
<service behaviorConfiguration="ERPServer.QuotationPrinterServiceBehavior"
name="ERPServer.QuotationPrinterService">
<endpoint address="" binding="wsHttpBinding" contract="ERPServer.IQuotationPrinterService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:9003/ERPServer/QuotationPrinterService/" />
</baseAddresses>
</host>
</service>




<behavior name="ERPServer.QuotationPrinterServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>




求助:为什么发布的时候总是提示“无法启动该服务。该服务没有定义终结点。请在配置文件中为该服务至少添加一个终接点,然后重试。”

[解决办法]
服务配置不正确。。。
http://bbs.cnw.com.cn/thread-178115-1-1.html
[解决办法]
service.name
endpoint.contract
中所指定的名称,要和 .svc 中的 class 全名称 和所要实现的 interface 全名称 完全一致。
[解决办法]

探讨
service.name
endpoint.contract
中所指定的名称,要和 .svc 中的 class 全名称 和所要实现的 interface 全名称 完全一致。

读书人网 >CAD教程

热点推荐