-1
我的WCF服務託管拋出錯誤時:WCFServiceException:必需屬性「綁定」未找到
WCF服務PayThisException:必需屬性「結合」未找到。 (C:\ Temp \ WCFVirtualDirPath \ web.config行278)
請幫我解決一些問題。
乾杯, 拉維Santlani
我的WCF服務託管拋出錯誤時:WCFServiceException:必需屬性「綁定」未找到
WCF服務PayThisException:必需屬性「結合」未找到。 (C:\ Temp \ WCFVirtualDirPath \ web.config行278)
請幫我解決一些問題。
乾杯, 拉維Santlani
我們展示你的web.config!特別是在<system.serviceModel>
部分中的所有內容。
如果您沒有web.config
文件,或者您的web.config
不包含<system.serviceModel>
部分 - 那就是您的問題!
只要你沒有真正顯示你的真實配置文件,我只能猜測什麼可能是錯的。這裏有一個WCF服務的配置應該是什麼樣子的樣本:
<system.serviceModel>
<services>
<service name="WCFBindings.Service1"
behaviorConfiguration="ServiceBehavior1">
<host>
<baseAddresses>
<add baseAddress="http://localhost:7876/YourService/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address
supplied above -->
<endpoint
address=""
binding="wsHttpBinding"
contract="WCFBindings.IService1">
<!--
Upon deployment, the following identity element should be
removed or replaced to reflect the identity under which the
deployed service runs. If removed, WCF will infer an
appropriate identity automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to
describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be
secured or removed before deployment -->
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior1">
<!-- To avoid disclosing metadata information, set the value
below to false and remove the metadata endpoint above
before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging
purposes, set the value below to true. Set to false
before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
您的消息說,「綁定屬性丟失」,所以最有可能的,你沒有指定ABC of WCF
- 地址,綁定合同上的<endpoint>
在你的服務配置。
它確實包含相同。我的bionding是wsHttpBinding – iTSrAVIE 2010-06-05 20:46:34
@ user359349:請更新您的原始文章與您的web.config的部分 - 我**不能**只是從你的幾行猜測什麼是錯的 - 我需要**看到**配置! –
2010-06-05 21:38:54