日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用Fiddler解析WCF RIA Service传输的数据

發(fā)布時間:2025/5/22 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用Fiddler解析WCF RIA Service传输的数据 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

????? 使用Fiddler 2 解析WCF RIA Service傳輸?shù)臄?shù)據(jù),您需要安裝一個PlugIn。下載解壓后,放在Inspectors文件中。重新啟動Fiddler,你就會看到WCF Binary的選項。

????? 下面的場景是,點一個Button根據(jù)ID查詢數(shù)據(jù),UI如下圖:

?????

???? Server端Code,ItemContext是DomainContext基類

1: var tt = new ItemContext(); 2: tblItemDataGrid.ItemsSource = tt.tblItems; 3: EntityQuery<tblItem> s = tt.GetTblItemsByItemNumberQuery(txtItemNumber.Text == "" ? 0 : Convert.ToInt32(txtItemNumber.Text)); 4: LoadOperation<tblItem> op = tt.Load(s);

?????? 此時我們通過Monitor可以看到類似下面文本:

@GetTblItemsByItemNumberResponsehttp://tempuri.org/@GetTblItemsByItemNumberResult aDomainServices i)http://www.w3.org/2001/XMLSchema-instance^TotalCount�^RootResults b7http://schemas.datacontract.org/2004/07/RIAServices.Web_tblItem_ItemDescription�Item Name1_ItemNumber�_Quantity�

???????? 就會被還原到這樣的明文:

<GetTblItemsByItemNumberResponse xmlns="http://tempuri.org/"> <GetTblItemsByItemNumberResult xmlns:a="DomainServices" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:TotalCount>1</a:TotalCount> <a:RootResults xmlns:b="http://schemas.datacontract.org/2004/07/RIAServices.Web"> <b:tblItem> <b:ItemDescription>Item Name1</b:ItemDescription> <b:ItemNumber>1</b:ItemNumber> <b:Quantity>1</b:Quantity> </b:tblItem> </a:RootResults> </GetTblItemsByItemNumberResult></GetTblItemsByItemNumberResponse>

? 是不是很實用,如果您是Debug本地的localhost的站點,可能需要修改hosts文件,或修改它的js配置。可以參考官方網(wǎng)站。

? 本文所使用例子是 可參考 WCF RIA Services 快速上手

? 希望對您開發(fā)有幫助。


作者:Petter Liu
出處:http://www.cnblogs.com/wintersun/
本文版權(quán)歸作者和博客園共有,歡迎轉(zhuǎn)載,但未經(jīng)作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責任的權(quán)利。
該文章也同時發(fā)布在我的獨立博客中-Petter Liu Blog。

轉(zhuǎn)載于:https://www.cnblogs.com/wintersun/archive/2011/01/05/1926386.html

總結(jié)

以上是生活随笔為你收集整理的使用Fiddler解析WCF RIA Service传输的数据的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。