我正在尝试连接到我的客户 SAP 系统。我正在使用以下代码进行连接,但是我如何知道连接已成功建立。
protected void Page_Load(object sender, EventArgs e)
{
try
{
SAPSystemConnect sapCfg = new SAPSystemConnect();
RfcDestinationManager.RegisterDestinationConfiguration(sapCfg);
RfcDestination rfcDest = null;
rfcDest = RfcDestinationManager.GetDestination("Dev");
}
catch (Exception ex)
{
lbl.Text=ex.Message;
}
}