2011-06-08 89 views
5

我跟着Eric's advice,它工作正常,但通過HttpWebRequest使用https的請求無法連接。在Fiddler中,我看到一個連接請求似乎返回正常,然後我的HttpWebRequest接收結果與ArgumentNullException。在Windows Phone模擬器上使用Fiddler調試HTTPS流量

這裏是異常的調用堆棧:

at System.IO.StringReader..ctor(String s) 
    at System.Net.Browser.HttpWebRequestHelper.ParseHeaders(Uri requestUri, SecurityCriticalDataForMultipleGetAndSet`1 headers, WebHeaderCollection collection, Boolean removeHttpOnlyCookies, HttpStatusCode& status, String& statusDescription) 
    at System.Net.Browser.ClientHttpWebResponse..ctor(String method, Uri url, HttpStatusCode status, String mime, SecurityCriticalDataForMultipleGetAndSet`1 headersString, Stream stream, Int32 expectedLen, CookieContainer cookieContainer) 
    at System.Net.Browser.ClientHttpWebResponse..ctor(String method, Uri url, HttpStatusCode status, String mime, SecurityCriticalDataForMultipleGetAndSet`1 headersString, Stream stream, CookieContainer cookieContainer) 
    at System.Net.Browser.ClientHttpWebRequest.Failed(Object sender, EventArgs e) 
    at MS.Internal.InternalWebRequest.OnDownloadFailed(Object sender, ErrorEventArgs args) 
    at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) 
    at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName) 

瀏覽器工作正常,我猜是的.Net之間的某種問題的電話和提琴手的代理上。順便說一句,同樣的事情發生在真正的手機上,甚至在iPad上(這意味着這不是.Net特定問題)

它可以修復嗎?

編輯:我可能反對一些安全限制,我不明白。我試過https://wellsfargo.comhttps://mail.google.com,並且在使用Fiddler時都返回「未找到」異常。

+0

我還沒有嘗試任何使用WP7的HTTPS編碼,但它可能是一個證書問題? http://msdn.microsoft.com/en-us/library/gg521150%28v=VS.92%29.aspx – keyboardP 2011-06-09 00:52:52

+0

可能 - 但WP7中沒有ServicePointManager跳過證書錯誤... – 2011-06-09 01:27:54

+0

errr ...在這種情況下哪個參數爲null?你是如何在IPAD上打這個的? – EricLaw 2011-06-09 03:20:33

回答

11

您必須將Fiddler的Root Cert安裝到模擬器中。打開移動IE並瀏覽至:http://computername:8888/fiddlerroot.cer。當提示時,安裝證書。完成之後HTTPS流量將通過提琴手隧道而不會出現問題。

+0

該問題也可能是本地計算機上「過時的」一套提琴手證書 - 從提琴手的HTTPS設置中刪除並重新添加它們。 – 2012-09-05 01:07:22

+0

太棒了!小提琴手網站給人的印象是不可能的! – 2013-02-27 00:53:02

相關問題