C# 如何在Dotnetbrowser中的http代理中提供凭据?

C# 如何在Dotnetbrowser中的http代理中提供凭据?,c#,http-proxy,dotnetbrowser,proxy-authentication,C#,Http Proxy,Dotnetbrowser,Proxy Authentication,我正在使用没有凭据的代理。但我需要在代理中提供用户名和密码。我正在我的构造函数中实现。这是我的工作代码 string proxyRules = String.Format("http={0}:{1};https={0}:{1};ftp={0}:{1};socks={0}:{1}", hostName, port); string exceptions = "<local>"; // bypass proxy

我正在使用没有凭据的代理。但我需要在代理中提供用户名和密码。我正在我的构造函数中实现。这是我的工作代码

        string proxyRules = String.Format("http={0}:{1};https={0}:{1};ftp={0}:{1};socks={0}:{1}", hostName, port);

        string exceptions = "<local>";  // bypass proxy server for local web pages 

        engine.Proxy.Settings = new CustomProxySettings(proxyRules, exceptions);

请提供任何示例代码或链接。

由于文档不完整,我面临此问题,完整代码如下:

engine.Network.AuthenticateHandler = new Handler<AuthenticateParameters, AuthenticateResponse>(p => AuthenticateResponse.Continue(userName, password));
engine.Network.AuthenticateHandler=新处理程序(p=>AuthenticateResponse.Continue(用户名、密码));
The name 'network' does not exists in current context
engine.Network.AuthenticateHandler = new Handler<AuthenticateParameters, AuthenticateResponse>(p => AuthenticateResponse.Continue(userName, password));