2015-06-30 5 views
0

Я пытаюсь подключиться к TRIDION используя сценарий службы ядра, вот мой код:Как начать 2660 порт в IIS для подключения основной службы Tridion использования netTcp

public static SessionAwareCoreServiceClient Client; 


Client = new SessionAwareCoreServiceClient("netTcp_2011"); 
Client.ClientCredentials.Windows.ClientCredential = new NetworkCredential(user, password); 

Web.config имеет следующее:

<system.serviceModel> 
    <!-- Default/example WCF settings for Core Service. These settings should be copied into the host application's configuration file. --> 
    <bindings> 
     <!-- Default Core Service binding settings are provided here. These can be used as a starting point for further customizations. --> 
     <basicHttpBinding> 
     <binding name="basicHttp" maxReceivedMessageSize="10485760"> 
      <readerQuotas maxStringContentLength="10485760" maxArrayLength="10485760"/> 
      <security mode="TransportCredentialOnly"> 
      <!-- For LDAP or SSO authentication of transport credentials, use clientCredentialType="Basic" --> 
      <transport clientCredentialType="Windows"/> 
      </security> 
     </binding> 
     <binding name="streamDownload_basicHttp" maxReceivedMessageSize="209715200" transferMode="StreamedResponse" messageEncoding="Mtom" sendTimeout="00:15:00"> 
      <security mode="TransportCredentialOnly"> 
      <!-- For LDAP or SSO authentication of transport credentials, use clientCredentialType="Basic" --> 
      <transport clientCredentialType="Windows"/> 
      </security> 
     </binding> 
     <binding name="streamUpload_basicHttp" maxReceivedMessageSize="209715200" transferMode="StreamedRequest" messageEncoding="Mtom" receiveTimeout="00:15:00"> 
      <security mode="None"/> 
     </binding> 
     </basicHttpBinding> 
     <netTcpBinding> 
     <binding name="netTcp" transactionFlow="true" transactionProtocol="WSAtomicTransaction11" maxReceivedMessageSize="2147483647"> 
      <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647"/> 
     </binding> 
     <binding name="streamDownload_netTcp" maxReceivedMessageSize="2147483647" transferMode="StreamedResponse" sendTimeout="00:20:00"/> 
     <binding name="streamUpload_netTcp" maxReceivedMessageSize="2147483647" transferMode="StreamedRequest" receiveTimeout="00:20:00"/> 
     </netTcpBinding> 
    </bindings> 
    <client>  
     <!--Dev 2013 --> 
     <endpoint name="netTcp_2011" address="net.tcp://localhost:2660/CoreService/2011/netTcp" binding="netTcpBinding" bindingConfiguration="netTcp" contract="Tridion.ContentManager.CoreService.Client.ISessionAwareCoreService"/> 
     <endpoint name="streamDownload_netTcp_2011" address="net.tcp://localhost:2660/CoreService/2011/streamDownload_netTcp" binding="netTcpBinding" bindingConfiguration="streamDownload_netTcp" contract="Tridion.ContentManager.CoreService.Client.IStreamDownload"/> 
     <endpoint name="streamUpload_netTcp_2011" address="net.tcp://localhost:2660/CoreService/2011/streamUpload_netTcp" binding="netTcpBinding" bindingConfiguration="streamUpload_netTcp" contract="Tridion.ContentManager.CoreService.Client.IStreamUpload"/> 
     <!-- --> 

    </client> 
    </system.serviceModel> 

Тем не менее, я получаю эту ошибку:

Could not connect to net.tcp://localhost:2660/CoreService/2011/netTcp. The connection attempt lasted for a time span of 00:00:01.0520000. TCP error code 10061: No connection could be made because the target machine actively refused it localhost:2660. 

Примечание: localhost также может быть IP-адресом экземпляра CMS.

Может ли кто-нибудь помочь?

+0

Прослушивание этого порта уже – Drew

ответ

2

Хорошо, поэтому с течением времени я получил образование и могу четко сказать, что ошибка target machine actively refused it localhost:2660 четко говорит о том, что порт не открыт для вас.

Так что эти две вещи, чтобы быть уверенным:

  1. Убедитесь, что вы позволили Net.Tcp в IIS
  2. И порт 2660 открыт в брандмауэре Windows?

    запустите netstat -tan, чтобы узнать, работает ли что-либо на 2660, если нет, то вы не можете получить к нему доступ.

Кроме того, если вы используете свой код формы локальной системы или с другого сервера, в случае netTcp не работает, попробуйте использовать wsHttp или BasicHttp (если у вас есть эти привязки в web.config вашей основной службы сервера)

1

Служба Core работает как служба Windows, а не от IIS. Откройте службы Windows и убедитесь, что запущен сервисный узел Tridion Content Manager.

 Смежные вопросы

  • Нет связанных вопросов^_^