为什么不使用Xamarin的MobileServiceClient的单点触控实现进行流量交易,显示在Fidder/Charles中 [英] Why doesn't traffic using Xamarin's monotouch implementation of MobileServiceClient show up in Fidder/Charles

查看:51
本文介绍了为什么不使用Xamarin的MobileServiceClient的单点触控实现进行流量交易,显示在Fidder/Charles中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能与以下问题相同:

This is probably the same question as:

使用MonoTouch时的HTTP流量监视问题,HttpClient和Charles Proxy

但是我想我会从Windows Azure移动服务客户端的角度来询问它.当我将iOS设备配置为指向提琴手(在Windows框上)或查尔斯(在Mac上)时,我可以看到来自浏览器或使用WebRequest的Xamarin应用程序的所有流量.但是,如果我直接使用Microsoft.WindowsAzure.MobileServices.MobileServiceClient(使用HttpClient)或HttpClient,则不会显示流量.

But I thought I would ask it from a Windows Azure Mobile Services Client perspective. When I configure my iOS device to point at either fiddler (on my windows box) or charles (on my mac) I can see all traffic from a browser or from an Xamarin app that uses WebRequest. However if I use either Microsoft.WindowsAzure.MobileServices.MobileServiceClient (which uses HttpClient) or HttpClient directly the traffic does not show up.

我试图看:

http://fiddlerbook.com/fiddler/help/hookup.asp #Q-DOTNET

对于一些建议,但我对Xamarin.IOS中HttpClient的实现了解不多,是否知道它们是否合适.即,我似乎无法按照以下建议使用GlobalProxySelection:

For some suggestions but I don't know enough about the implementation of HttpClient in Xamarin.IOS to know if they are appropriate. i.e. I couldn't seem to be able to use GlobalProxySelection as advised in:

GlobalProxySelection.Select = new WebProxy("127.0.0.1", 8888);

我不认为使用app.config的建议:

and I don't think the app.config suggestion of using:

  <defaultProxy>
      <proxy bypassonlocal="false" usesystemdefault="true" />
    </defaultProxy>

适用于Xamarin应用程序.对我来说,一个很好的起点是了解HttpClient与WebRequest的不同之处,以便跟踪问题,但希望有人可以告诉我我需要做些什么来解决此问题.

is appropriate for an Xamarin app. A good starting point for me would be to understand what HttpClient is doing differently to WebRequest in order to track the problem down but hopefully someone can just tell me what I need to do to fix this.

谢谢

F

注意:我没有使用本地地址,因此不会使用该地址. 注意:通过运行 http://docs.xamarin.com/samples/HttpClient/在配置为使用提琴手/查尔斯作为代理并观察HttpClient流量的iOS设备上没有出现.

NOTE: I am not using a local address so that doesn't come into it. NOTE: This can easily be tested by running http://docs.xamarin.com/samples/HttpClient/ on an iOS device configured to use fiddler/charles as a proxy and watching as the HttpClient traffic doesn't appear.

推荐答案

这是相同的问题,答案也应一样. IOW,您需要设置代理或使用支持CFNetworkHttpClient处理程序.

It's the same question and the answer should also be identical. IOW you need to set the proxy or use an HttpClient handler that supports CFNetwork.

这篇关于为什么不使用Xamarin的MobileServiceClient的单点触控实现进行流量交易,显示在Fidder/Charles中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆