3

I am able to get Core Service Client, but below code throwing error :

 XElement xmlCategories = _client.GetListXml(_publicationUri, new RepositoryItemsFilterData { ItemTypes = new[] { ItemType.Category } });

As this is the new code deploy to the production server, it's working fine till UAT, so I believe there are some ports needs to be open which I am missing.

Update I am getting below error mesage :

The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout." {0: "The open operation did not complete within the allotted timeout of 00:01:00.

Also, I am using nettcp biniding,and my Production CME and Presentation servers are different. below is the code

public SessionAwareCoreServiceClient GetNewClient(string endPoint, string hostname, string username, string password)
        {
            EndpointAddress endpointAddress = new EndpointAddress(endPoint);
            var netTcpBinding = new NetTcpBinding
            {
                Name = "netTcp_2013",
                TransactionFlow = true,
                TransactionProtocol = TransactionProtocol.OleTransactions,
                MaxReceivedMessageSize = 10485760,
                ReaderQuotas = new XmlDictionaryReaderQuotas
                {
                    MaxStringContentLength = 10485760,
                    MaxArrayLength = 10485760
                }
            };

            _client = new SessionAwareCoreServiceClient(netTcpBinding, endpointAddress);
            _client.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential(username, password);
            return _client;
        }
  • Can you copy the error message you are getting? – Atila Sos Mar 7 at 13:28
  • Hi @AtilaSos i update the wuestion with error details. – Neelesh Raghuvanshi Mar 8 at 5:42
  • I doubt that you get such an error if the problem lies in a port being closed (that typically leads to a “Connection refused” error). – Rick Pannekoek Mar 8 at 8:13
  • @RickPannekoek Thanks Rick for your comments, what do you mean why connection refused ? – Neelesh Raghuvanshi Mar 9 at 13:49
3

it isn't so much a port issue, it's how you interact with Core Service endpoint.

For entire documentation, please take a look at following part of official documentation. There you can see how you can instantiate client, set credentials during connection, and how you can use different binding for connecting.

0

That depends on which endpoint you are using, http or net.tcp. Net.tcp is by default on 2660, as for http, it's the same as for the CME.

0

Increase the SendTimeout, ReceiveTimeout, CloseTimeout and OpenTimeout to 10 minutes on NetTcpBinding to resolve the problem.

receiveTimeout="00:10:00"
sendTimeout="00:10:00"
closeTimeout="00:10:00"
openTimeout="00:10:00"
  • thanks @siva for your comments, but it dint help. Now i can see application is is trying to connect for 10 minutes then it is getting timeut. I checked 2660 port is also open. – Neelesh Raghuvanshi Mar 9 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.