1

On First Transaction:

I was creating Components using WCF service in my application, few times it was showing below error while creating/updating the Multimedia Component.

The requested service, 'http://testservicexyz.com/webservices/CoreService2011.svc/streamUpload_basicHttp' could not be activated. See the server's diagnostic trace logs for more information.

Once I got such error for a multimedia Component, there after for every multimedia while Creation/updating the Components through core service in WCF getting below error

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) The network path was not found

Below is my WCF service Config details

<binding name="streamDownload_basicHttp" closeTimeout="00:05:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="1073741824" maxBufferSize="1073741824" maxReceivedMessageSize="1073741824"
          textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
          messageEncoding="Mtom">
          <readerQuotas maxDepth="32" maxStringContentLength="15000001"
            maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Basic" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>

Whenever I tried on second transaction it was working as expected, multimedia Components are created/updated successfully without any error.

Update :

From Event Log

Component: Tridion.ContentManager.CoreService
Errorcode: 0
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.SqlClient.SqlConnection.Open()
   at Tridion.ContentManager.Data.AdoNet.DatabaseUtilities.GetConnection()
   at Tridion.ContentManager.Data.AdoNet.DatabaseUtilities.ExecuteReader(StoredProcedureInvocation storedProcedureInvocation, Nullable`1 commandBehavior)
   at Tridion.ContentManager.Data.AdoNet.SystemDataMapper.Tridion.ContentManager.Data.ISystemDataMapper.GetListClaimMappings(ClaimMappingsFilterData filter)
   at Tridion.ContentManager.Security.AuthorizationManager.GetListClaimMappingData()
   at Tridion.ContentManager.Security.AuthorizationManager.LoadAccessToken(IEnumerable`1 claims)
   at Tridion.ContentManager.Session..ctor(IEnumerable`1 claims)
   at Tridion.ContentManager.CoreService.SessionHelper.GetCurrentSession()
   at Tridion.ContentManager.CoreService.CoreServiceBase.get_CurrentSession()
   at Tridion.ContentManager.CoreService.CoreServiceBase.GetDefaultData(ItemType itemType, String containerId, ReadOptions readOptions)
   at Tridion.ContentManager.CoreService.CoreServiceBase.GetDefaultData(ItemType itemType, String containerId)
   at SyncInvokeGetDefaultData(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Tridion.ContentManager.CoreService.CoreServiceInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
4
  • is it failing everytime when you start?
    – Raj Kumar
    Commented Jun 6, 2017 at 11:16
  • No .. only few times
    – Kumar_diru
    Commented Jun 6, 2017 at 11:35
  • 1
    Given you're seeing DB issues.... always worth checking if you are maintaining the DB. See also: tridion.stackexchange.com/questions/12225/…
    – Nuno Linhares
    Commented Jul 7, 2017 at 13:24
  • The media bytes would always be little bit of more work to db, and that too with core service, Nuno's reference is completely valid, Its just DB which is overdosed and now need a while to wakeup. Commented Jul 27, 2017 at 21:56

1 Answer 1

-2

As you mentioned that the issue happens only for the first transaction, I feel it could be a timeout issue. So, try increasing the below timeouts in your WCF service Config file

closeTimeout="00:05:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"

Do an IISReset and give a try again. Hope that helps to fix the issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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