【发布时间】:2012-12-31 20:47:43
【问题描述】:
您好,我正在尝试使用以下代码使用另一个人的凭据通过核心服务连接到 Tridion:
using (ChannelFactory<ISessionAwareCoreService> factory =
new ChannelFactory<ISessionAwareCoreService>("netTcp_2011"))
{
NetworkCredential networkCredential =
new NetworkCredential("username", "password", "domain");
factory.Credentials.Windows.ClientCredential = networkCredential;
ISessionAwareCoreService client = factory.CreateChannel();
Console.WriteLine(client.GetCurrentUser().Title);
但我出错了:
Could not connect to net.tcp://localhost:2660/CoreService/2011/netTcp. The connection attempt lasted for a time span of 00:00:01.0310784. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:2660
【问题讨论】:
-
Tridion 事件日志中有任何内容吗?对我来说看起来像防火墙问题。 2660端口开放了吗?
-
尝试从同一台机器连接,并检查事件查看器
-
您也可以编辑您的问题并为您的 netTcp_2011 绑定添加端点信息吗?
-
这似乎是因为你是远程的,所以这个错误与连接问题有关,而不是假冒。尝试改用 wsHttp_2011。
标签: .net tridion tridion-2011 core-services tridion-core-services