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 实例的每一次调用所使用的 WebRequest。An 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.