HttpWebRequest.Proxy in Windows Phone 7?

2020-02-13 03:03发布

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

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

2条回答
仙女界的扛把子
2楼-- · 2020-02-13 03:31

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.

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.

查看更多
我想做一个坏孩纸
3楼-- · 2020-02-13 03:54

No currently you cant use a Proxy with WebClient or HttpWebRequest. With Mango you can use Sockets.

查看更多
登录 后发表回答