我在我的vba代码中使用TDApiOle80.TDConnection连接到HP ALM。但是,当我尝试远程连接到HP ALM时,我需要使用代理。有没有一种方法/方法可以让我们在vba中使用代理来连接ALM。
答案 0 :(得分:0)
User ConnectionSettings用于设置代理和端口的对象。
Single sign on connection (C#)// configure connection settings
ConnectionSettings cs = new ConnectionSettings();
cs.ExecutionMode =
TDAPI_EXECUTION_MODES.EXECUTION_MODE_INTERACTIVE;
cs.BasicAuthHeaderMode = TDAPI_BASIC_AUTH_HEADER_MODES.HEADER_MODE_ONCE;
cs.SetWebServerCredentials("login", "pass");
// import to OTA Connection
TDConnection otaConnection = new TDConnection();
otaConnection.ImportConnectionSettings(cs);
// pre-configure the connection to add Basic Auth Header at first request
otaConnection.SetBasicAuthHeaderMode(TDAPI_BASIC_AUTH_HEADER_MODES.HEADER_MODE_ONCE);
// set user credentials
otaConnection.SetServerCredentials("Login", "Password");
// init connect to ALM server
otaConnection.InitConnection("http://<server URL>/qcbin");