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

How to provide Credentials in http Proxy in Dotnetbrowser?

我正在 Dotnetbrowser using proxy without credentials. But i need to provide username and password in proxy. I'm implementing the code 我的构造函数中工作。这是我的工作代码

        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);

我找到了代码,但由于代码不完整而无法实现

network.AuthenticateHandler = new Handler<AuthenticateParameters, AuthenticateResponse>(p =>
AuthenticateResponse.Continue("<username>", "<password>"));

当我将这段代码粘贴到我的 class 时,文档不完整,它给出了异常

The name 'network' does not exists in current context

请提供任何示例代码或link。

由于文档不完整,我遇到了这个问题,完整的代码如下:

engine.Network.AuthenticateHandler = new Handler<AuthenticateParameters, AuthenticateResponse>(p => AuthenticateResponse.Continue(userName, password));