简体   繁体   English

实施Silverlight代理客户端?

[英]Implement a Silverlight proxy client?

Is it possible in Silverlight to create a proxy client, meaning the Silverlight application knows the host, port, username and password of the proxy server, then establishes a connection to the proxy server? 在Silverlight中是否可以创建代理客户端,这意味着Silverlight应用程序知道代理服务器的主机,端口,用户名和密码,然后建立与代理服务器的连接?

The Silverlight application would then be able to issues HTTP requests to resources behind that proxy server. 然后,Silverlight应用程序将能够向该代理服务器后面的资源发出HTTP请求。

This way, the Silverlight application would reach certain resources without having to install a thirdparty proxy client on the client-machine first, because the proxy client would be part of the Silverlight application itself. 这样,Silverlight应用程序将获得某些资源,而不必首先在客户端计算机上安装第三方代理客户端,因为代理客户端将是Silverlight应用程序本身的一部分。

I use the WebClient to issue HTTP requests from Silverlight. 我使用WebClient发出来自Silverlight的HTTP请求。

WebClient has a Proxy property, but not in Silverlight. WebClient具有Proxy属性,但Silverlight中没有。

So I made a webservice, that takes an url and some proxy-server information. 因此,我做了一个Web服务,它带有一个URL和一些代理服务器信息。 The webservice uses the WebClient and the Proxy property to direct the HTTP request to the proxy-server. Web服务使用WebClient和Proxy属性将HTTP请求定向到代理服务器。

Then the Silverlight application calls that webservice, gives it an url and some proxy-server information. 然后,Silverlight应用程序调用该Web服务,为其提供一个url和一些代理服务器信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM