新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
WCF異常調(diào)試正確開啟方式詳解
WCF開發(fā)工具中對于異常的處理是一個比較基本的操作步驟,在實(shí)際應(yīng)用中,可以給我們的程序開發(fā)帶來非常大的好處。那么,WCF異常調(diào)試應(yīng)該如何正確啟用呢?當(dāng)你看到service發(fā)送的信息時怎樣簡便的調(diào)試異常?實(shí)現(xiàn)的方式就是向web.config文件中添加一段代碼。之后你可以看到下面的配置段

創(chuàng)新互聯(lián)建站是一家專注于網(wǎng)站設(shè)計、做網(wǎng)站與策劃設(shè)計,興文網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)建站做網(wǎng)站,專注于網(wǎng)站建設(shè)十多年,網(wǎng)設(shè)計領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:興文等地區(qū)。興文做網(wǎng)站價格咨詢:18980820575
- < serviceDebug includeExceptionDetailInFaults="true" />
它將設(shè)置系統(tǒng)在返回的故障中,包括異常的詳細(xì)資料。如果你完成此設(shè)置,確認(rèn)以添加下列代碼。你會發(fā)現(xiàn)異常信息將可以被用來找到你的服務(wù)器堆棧的WCF異常調(diào)試方式。
- < system.serviceModel>
- < services>
- < service name="OneCareStatus.LogUploadService" behaviorConfiguration=
"UploadServiceBehavior">- < endpoint address="" contract="OneCareStatus.ILogUploadService"
binding="wsHttpBinding" bindingConfiguration="myHttpBinding"/>- < /service>
- < service name="OneCareStatus.FamilySafetyService"
behaviorConfiguration="UploadServiceBehavior">- < endpoint address="" contract="WpcSettings.IWpcSettingsService"
binding="wsHttpBinding" bindingConfiguration="myHttpBinding"/>- < /service>
- < /services>
- < bindings>
- < wsHttpBinding>
- < binding name="myHttpBinding">
- < security mode="None" />
- < reliableSession enabled="true"/>
- < /binding>
- < /wsHttpBinding>
- < /bindings>
- < behaviors>
- < serviceBehaviors>
- < behavior name="UploadServiceBehavior">
- < serviceMetadata httpGetEnabled="true" />
- < serviceDebug includeExceptionDetailInFaults="true" /> < /behavior>
- < /serviceBehaviors>
- < /behaviors>
- < /system.serviceModel>
以上就是我們?yōu)榇蠹医榻B的WCF異常調(diào)試的相關(guān)啟用方式。
分享名稱:WCF異常調(diào)試正確開啟方式詳解
網(wǎng)頁網(wǎng)址:http://m.fisionsoft.com.cn/article/dpdssid.html


咨詢
建站咨詢
