下面是一个简单的代码示例,可以帮助诊断问题:
using System; using Microsoft.BizTalk.ExplorerOM;
class Program { static void Main(string[] args) { BtsCatalogExplorer explorer = new BtsCatalogExplorer(); explorer.ConnectionString = "Integrated Security=SSPI;Data Source=myServer;Initial Catalog=BizTalkMgmtDb;"; Application app = explorer.Applications["MyApplication"];
foreach (ReceivePort port in app.ReceivePorts)
{
Console.WriteLine(port.Name);
}
Console.ReadLine();
}
}
要使用此代码,请替换以下内容: