我正在使用连接器将 SAP 系统与 .NET 4.0 连接起来......我创建了一个示例 windows appln 来检查它是否正在连接......这是我的代码......
private void Form1_Load(object sender, EventArgs e)
{
try
{
SAPSystemConnect sapCfg = new SAPSystemConnect();
RfcDestinationManager.RegisterDestinationConfiguration(sapCfg);
RfcDestination rfcDest = null;
rfcDest = RfcDestinationManager.GetDestination("Dev");
}
catch (Exception ex)
{
// MessageBox.Show("ERROR");
label1.text=ex.Message;
}
}
运行此代码时没有任何反应...即使我在应用程序设置(配置文件)中提供了错误的用户名和密码,它也没有显示任何异常,它只是在加载表单...
谁能解开我的疑惑?我们有没有其他方法可以找到系统是否连接?