【发布时间】:2015-02-26 08:21:11
【问题描述】:
我有 WCF 服务,这是我的 app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="PassAccessSystem.DBService.DBHostService">
<endpoint address="" binding="basicHttpBinding" contract="PassAccessSystem.DBService.IDBHostService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/PassAccessSystem/DBHostService/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
但是现在当我想创建 WCF 客户端时,在 ADD SERVICE REFERANCE 窗口中我找不到我的服务??? 我的 app.config 有什么问题?还是其他问题?`
An error occured while attempting to find services
或
cannot download metadata
【问题讨论】:
-
这不是 Web 应用程序,我可以添加哪些 Web 服务?
-
这个app.config对吗?
标签: c# wcf service client app-config