I have followed Eric's advice and it works fine, with the exception that requests using https through HttpWebRequest fail to connect. In Fiddler, I see a Connect request which seems to return fine and then my HttpWebRequest receives a result with an ArgumentNullException.
Here's the call stack of the exception:
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)
Browser works fine, my guess it is some kind of problem between .Net on the phone and the Fiddler's proxy. BTW, the same thing happens on the real phone and even on IPad (which means this is not .Net specific problem)
Can it be fixed?
EDIT: I am probably against some security restriction that I don't understand. I tried https://wellsfargo.com and https://mail.google.com and both return "Not Found" exception when using Fiddler.
You have to install Fiddler's Root Cert into the emulator. Open Mobile IE and browse to: http://computername:8888/fiddlerroot.cer. When prompted, install the cert. After you're done HTTPS traffic will tunnel through fiddler without a problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With