Windows Phone 7中的HttpWebRequest.Proxy? [英] HttpWebRequest.Proxy in Windows Phone 7?

查看:39
本文介绍了Windows Phone 7中的HttpWebRequest.Proxy?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET Compact Framework似乎不包含HttpWebRequest的Proxy属性.

It seems that .NET Compact Framework does not include a Proxy property for HttpWebRequest.

无论如何,当我从HttpWebRequest读取内容时可以使用代理吗?

Is there anyway, I can use proxy when reading from a HttpWebRequest?

推荐答案

目前,这不可能从您的应用程序中以编程方式实现.在Windows中,代理设置是在Internet Explorer中配置的.在电话上,您可以从设置"中的编辑网络"中配置代理服务器设置,如果执行此操作,并且已连接到WiFi网络,它将通过代理服务器建立连接.

No this is not currently possible to do it programatically from within your application. In windows proxy settings are configured in internet explorer. On the phone you can configure proxy settings from Edit Network inside Settings, if you do this and you are connected to a WiFi network it will make the connection go via the proxy.

但是,如果您真的想从应用程序中选择通过代理进行连接,则可以使用Mango版本来实现.在芒果中,您将可以更大程度地访问网络堆栈,并且可以使用Raw中的System.Net.Socket使用TCP/IP连接到代理.您将连接到代理,然后手动构造Http Header,响应将通过代理服务器包含Http响应.

However if you really want to problematically opt to connect via a proxy from your application you could do this With Mango release. In mango you will have greater access to the networking stack, you would be able to connect to a proxy using TCP/IP using System.Net.Socket in the raw. You would connect to the Proxy and then construct the Http Header Manually, the response would contain the Http response via the proxy server.

这篇关于Windows Phone 7中的HttpWebRequest.Proxy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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