WebRequest.GetSystemWebProxy 方法

定义

返回当前模拟用户的 Internet Explorer 设置中配置的代理。Returns a proxy configured with the Internet Explorer settings of the currently impersonated user.

public:
 static System::Net::IWebProxy ^ GetSystemWebProxy();
public static System.Net.IWebProxy GetSystemWebProxy ();
static member GetSystemWebProxy : unit -> System.Net.IWebProxy
Public Shared Function GetSystemWebProxy () As IWebProxy

返回

IWebProxy 实例的每一次调用所使用的 WebRequestAn IWebProxy used by every call to instances of WebRequest.

注解

GetSystemWebProxy方法读取当前用户的 Internet Explorer (IE)代理设置。GetSystemWebProxy method reads the current user's Internet Explorer (IE) proxy settings. 此过程包括用于自动检测代理设置的 IE 选项、使用自动配置脚本、手动代理服务器设置和高级手动代理服务器设置。This process includes the IE options to automatically detect proxy settings, use an automatic configuration script, manual proxy server settings, and advanced manual proxy server settings.

如果你的应用程序正在模拟多个用户,则GetSystemWebProxy可以使用方法检索每个模拟用户的代理。If your application is impersonating several users, you can use the GetSystemWebProxy method to retrieve a proxy for each impersonated user.

安全性

WebPermission
获取或设置全局 HTTP 代理。To get or set the global HTTP proxy. 关联的枚举:UnrestrictedAssociated enumeration: Unrestricted

适用于