web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

internal server error 500 for accessing webAPI and "server encountered error" for accessing OrganizationData

(0) ShareShare
ReportReport
Posted on by

hey guys,

I have a dynamics crm 2016 (which was lately upgraded from 2015) up and running.

I had an issue with OrganizationData.svc service (and all other services) which stopped working some day back to when I had 2015 version working.

So, I decided to upgrade the server to see if the problem resolves but still no success.

when I try to access to "http://crm-server-uri/api/data/v8.1/" I get a HTTP error 500 stating some internal server error occures. I have even turned on DevErrors in the application settings in my IIS for my CRM web application but still I get some generic as hell error:

Screen-Shot-1395_2D00_03_2D00_16-at-15.21.49.png

I again cannot successfully fetch the OrganizationData.svc service:

Screen-Shot-1395_2D00_03_2D00_16-at-15.26.02.png

can anyone point me out some where safe?!

*This post is locked for comments

I have the same question (0)
  • Mahendar Pal Profile Picture
    45,095 on at

    Did you try to enable tracing and check log files ?? if not try to do that, may you will get some pointer , you can also check event viewer for any error registered there.

  • Community Member Profile Picture
    on at

    yes I did try. I have enabled the tracing option.

    I get some sort of odd traces which all of them include some sort of complex exceptions although some lines repeat in the trace file stating "Access is Denied":

    ><TraceRecord xmlns="schemas.microsoft.com/.../TraceRecord" Severity="Error">
    <TraceIdentifier>msdn.microsoft.com/.../System.ServiceModel.Diagnostics.ThrowingException.aspx
    </TraceIdentifier><Description>Throwing an exception.</Description>
    <AppDomain>/LM/W3SVC/1/ROOT-1-131096630229998064</AppDomain>
    <Exception><ExceptionType>System.ServiceModel.FaultException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
    <Message>Access is denied.</Message>
    <StackTrace> at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp;amp; rpc)
    I paste the trace here in case it will be of help for someone to enlighten me:
    # CRM Tracing Version 2.0
    # LocalTime: 2016-06-05 22:03:50.812
    # Categories: 
    # CallStackOn: Yes
    # ComputerName: ---------
    # CRMVersion: 8.0.0000.1088
    # DeploymentType: OnPremise
    # ScaleGroup: 
    # ServerRole: AppServer, AsyncService, DiscoveryService, ApiServer, HelpServer, DeploymentService, SandboxServer, DeploymentManagementTools, VssWriter, EmailConnector
    
    [2016-06-05 22:03:50.812] Process: w3wp |Organization:b060ed47-cc6f-4336-9e65-7d5879d29e62 |Thread:   25 |Category: Platform.Metadata |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 92dd8a22-c339-4be6-b2ac-770c5c1a0eb3 | <>c__DisplayClass1.<LoadMetadataContainerFromDatabase>b__0  ilOffset = 0x14
    	at <>c__DisplayClass1.<LoadMetadataContainerFromDatabase>b__0(CrmDbConnection sqlConn, IDbTransaction sqlTrans)  ilOffset = 0x14
    	at DynamicMetadataCacheLoader.LoadMetadataContainerFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter, BuildMetadataContainerFromDatabaseTemplate buildMetadataContainerFromDatabase, Nullable`1 optionalVersionNumberToFilterResults)  ilOffset = 0x183
    	at DynamicMetadataCacheLoader.LoadMetadataContainerFromDatabase(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter, Nullable`1 optionalVersionNumberToFilterResults)  ilOffset = 0x39
    	at DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter)  ilOffset = 0x30
    	at DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, CounterList counter)  ilOffset = 0x23
    	at DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context)  ilOffset = 0x132
    	at MetadataCache.LoadCache(IOrganizationContext context, Boolean fileOnlyIfExists)  ilOffset = 0xE1
    	at MetadataCache.GetInstance(IOrganizationContext context)  ilOffset = 0x8E
    	at BusinessEntityMoniker..ctor(Guid id, String entityName, IOrganizationContext orgContext)  ilOffset = 0x19
    	at OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)  ilOffset = 0x4F
    	at ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)  ilOffset = 0x74
    	at CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)  ilOffset = 0x8
    	at CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)  ilOffset = 0x3A
    	at OrganizationFeatureControlChecks.IsFeatureEnabled(IFeatureDetail featureDetail, Guid organizationId)  ilOffset = 0x54
    	at FeatureControlChecker.CheckFeature(IFeatureDetail feature, Guid organizationId)  ilOffset = 0x52
    	at FeatureDetail.IsEnabled(Guid organizationId, Version currentOrgDBVersion)  ilOffset = 0x4A
    	at FeatureEnabledHelper.IsFeatureEnabled(IFeatureDetail featureDetail, IOrganizationContext context)  ilOffset = 0x3C
    	at FeatureEnabledHelper.IsFeatureEnabled(String featureName, IOrganizationContext context)  ilOffset = 0x16
    	at AuthenticationProvider.Authenticate(HttpApplication application)  ilOffset = 0x117
    	at AuthenticationStep.Authenticate(HttpApplication application)  ilOffset = 0x4E
    	at AuthenticationPipeline.Authenticate(HttpApplication application)  ilOffset = 0x11
    	at AuthenticationEngine.Execute(Object sender, EventArgs e)  ilOffset = 0x170
    	at SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  ilOffset = 0x5D
    	at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  ilOffset = 0x15
    	at PipelineStepManager.ResumeSteps(Exception error)  ilOffset = 0x27C
    	at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)  ilOffset = 0x31
    	at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)  ilOffset = 0xD3
    	at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x11E
    	at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x9
    	at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF
    	at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF
    	at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x1C8
    	at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x9
    >Multi-org sharable cache loading system and non-system metadata with build number 8.0.0.1088 and language 1033
    [2016-06-05 22:04:27.483] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   37 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: e7b2ed83-16c7-4fcb-9d3f-b67f1cab7701 | ServiceModelTraceRedirector.TraceData  ilOffset = 0x45
    	at ServiceModelTraceRedirector.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x45
    	at TraceSource.TraceData(TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x6E
    	at LegacyDiagnosticTrace.TraceEvent(TraceEventType type, Int32 code, String msdnTraceCode, String description, TraceRecord trace, Exception exception, Object source)  ilOffset = 0x6B
    	at ExceptionUtility.ThrowHelper(Exception exception, TraceEventType eventType, TraceRecord extendedData)  ilOffset = 0x61
    	at AuthorizationBehavior.Authorize(MessageRpc& rpc)  ilOffset = 0x53
    	at ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)  ilOffset = 0x293
    	at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
    	at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)  ilOffset = 0x256
    	at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)  ilOffset = 0xF1
    	at ChannelHandler.AsyncMessagePump(IAsyncResult result)  ilOffset = 0x39
    	at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)  ilOffset = 0x22
    	at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)  ilOffset = 0x5
    	at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)  ilOffset = 0x3C
    ><TraceRecord xmlns="schemas.microsoft.com/.../TraceRecord" Severity="Error"><TraceIdentifier>msdn.microsoft.com/.../System.ServiceModel.Diagnostics.ThrowingException.aspx&lt;/TraceIdentifier><Description>Throwing an exception.</Description><AppDomain>/LM/W3SVC/1/ROOT-1-131096630229998064</AppDomain><Exception><ExceptionType>System.ServiceModel.FaultException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Access is denied.</Message><StackTrace>   at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
    >   at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    >   at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    >   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    ></StackTrace><ExceptionString>System.ServiceModel.FaultException: Access is denied.</ExceptionString></Exception></TraceRecord>
    [2016-06-05 22:07:10.514] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   15 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 79c8f92b-ed3f-472e-8cab-d6d6a46561b0 | ServiceModelTraceRedirector.TraceData  ilOffset = 0x45
    	at ServiceModelTraceRedirector.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x45
    	at TraceSource.TraceData(TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x6E
    	at LegacyDiagnosticTrace.TraceEvent(TraceEventType type, Int32 code, String msdnTraceCode, String description, TraceRecord trace, Exception exception, Object source)  ilOffset = 0x6B
    	at ExceptionUtility.ThrowHelper(Exception exception, TraceEventType eventType, TraceRecord extendedData)  ilOffset = 0x61
    	at AuthorizationBehavior.Authorize(MessageRpc& rpc)  ilOffset = 0x53
    	at ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)  ilOffset = 0x293
    	at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
    	at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)  ilOffset = 0x256
    	at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)  ilOffset = 0xF1
    	at ChannelHandler.AsyncMessagePump(IAsyncResult result)  ilOffset = 0x39
    	at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  ilOffset = 0x0
    	at AsyncResult.Complete(Boolean completedSynchronously)  ilOffset = 0xC2
    	at AsyncQueueReader.Set(Item item)  ilOffset = 0x21
    	at InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)  ilOffset = 0xD6
    	at InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)  ilOffset = 0x0
    	at SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)  ilOffset = 0x3D
    	at EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result)  ilOffset = 0x61
    	at EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result)  ilOffset = 0x13
    	at AsyncResult.SyncContinue(IAsyncResult result)  ilOffset = 0x12
    	at EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state)  ilOffset = 0x6
    	at HttpContextReceivedAsyncResult`1.ProcessHttpContextAsync()  ilOffset = 0xC5
    	at HttpChannelListener`1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)  ilOffset = 0x0
    	at HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)  ilOffset = 0x62
    	at HostedHttpRequestAsyncResult.HandleRequest()  ilOffset = 0x10E
    	at HostedHttpRequestAsyncResult.BeginRequest()  ilOffset = 0x0
    	at HostedHttpRequestAsyncResult.OnBeginRequest(Object state)  ilOffset = 0x9
    	at AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)  ilOffset = 0x0
    	at HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)  ilOffset = 0x30
    	at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)  ilOffset = 0x22
    	at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)  ilOffset = 0x5
    	at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)  ilOffset = 0x3C
    ><TraceRecord xmlns="schemas.microsoft.com/.../TraceRecord" Severity="Error"><TraceIdentifier>msdn.microsoft.com/.../System.ServiceModel.Diagnostics.ThrowingException.aspx&lt;/TraceIdentifier><Description>Throwing an exception.</Description><AppDomain>/LM/W3SVC/1/ROOT-1-131096630229998064</AppDomain><Exception><ExceptionType>System.ServiceModel.FaultException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Access is denied.</Message><StackTrace>   at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
    >   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    >   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    >   at System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item)
    >   at System.Runtime.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
    >   at System.Runtime.InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    >   at System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    >   at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result)
    >   at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result)
    >   at System.Runtime.AsyncResult.SyncContinue(IAsyncResult result)
    >   at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state)
    >   at System.ServiceModel.Channels.HttpChannelListener`1.HttpContextReceivedAsyncResult`1.ProcessHttpContextAsync()
    >   at System.ServiceModel.Channels.HttpChannelListener`1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)
    >   at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
    >   at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
    >   at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    >   at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    >   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    ></StackTrace><ExceptionString>System.ServiceModel.FaultException: Access is denied.</ExceptionString></Exception></TraceRecord>
    [2016-06-05 22:07:26.436] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   34 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 5070ef57-6791-46c0-9867-d06e62ee5c44 | ServiceModelTraceRedirector.TraceData  ilOffset = 0x45
    	at ServiceModelTraceRedirector.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x45
    	at TraceSource.TraceData(TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x6E
    	at LegacyDiagnosticTrace.TraceEvent(TraceEventType type, Int32 code, String msdnTraceCode, String description, TraceRecord trace, Exception exception, Object source)  ilOffset = 0x6B
    	at ExceptionUtility.ThrowHelper(Exception exception, TraceEventType eventType, TraceRecord extendedData)  ilOffset = 0x61
    	at AuthorizationBehavior.Authorize(MessageRpc& rpc)  ilOffset = 0x53
    	at ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)  ilOffset = 0x293
    	at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
    	at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)  ilOffset = 0x256
    	at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)  ilOffset = 0xF1
    	at ChannelHandler.AsyncMessagePump(IAsyncResult result)  ilOffset = 0x39
    	at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  ilOffset = 0x0
    	at AsyncResult.Complete(Boolean completedSynchronously)  ilOffset = 0xC2
    	at AsyncQueueReader.Set(Item item)  ilOffset = 0x21
    	at InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)  ilOffset = 0xD6
    	at InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)  ilOffset = 0x0
    	at SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)  ilOffset = 0x3D
    	at EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result)  ilOffset = 0x61
    	at EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result)  ilOffset = 0x13
    	at AsyncResult.SyncContinue(IAsyncResult result)  ilOffset = 0x12
    	at EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state)  ilOffset = 0x6
    	at HttpContextReceivedAsyncResult`1.ProcessHttpContextAsync()  ilOffset = 0xC5
    	at HttpChannelListener`1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)  ilOffset = 0x0
    	at HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)  ilOffset = 0x62
    	at HostedHttpRequestAsyncResult.HandleRequest()  ilOffset = 0x10E
    	at HostedHttpRequestAsyncResult.BeginRequest()  ilOffset = 0x0
    	at HostedHttpRequestAsyncResult.OnBeginRequest(Object state)  ilOffset = 0x9
    	at AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)  ilOffset = 0x0
    	at HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)  ilOffset = 0x30
    	at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)  ilOffset = 0x22
    	at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)  ilOffset = 0x5
    	at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)  ilOffset = 0x3C
    ><TraceRecord xmlns="schemas.microsoft.com/.../TraceRecord" Severity="Error"><TraceIdentifier>msdn.microsoft.com/.../System.ServiceModel.Diagnostics.ThrowingException.aspx&lt;/TraceIdentifier><Description>Throwing an exception.</Description><AppDomain>/LM/W3SVC/1/ROOT-1-131096630229998064</AppDomain><Exception><ExceptionType>System.ServiceModel.FaultException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Access is denied.</Message><StackTrace>   at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    >   at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
    >   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    >   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    >   at System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item)
    >   at System.Runtime.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
    >   at System.Runtime.InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    >   at System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    >   at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result)
    >   at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result)
    >   at System.Runtime.AsyncResult.SyncContinue(IAsyncResult result)
    >   at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state)
    >   at System.ServiceModel.Channels.HttpChannelListener`1.HttpContextReceivedAsyncResult`1.ProcessHttpContextAsync()
    >   at System.ServiceModel.Channels.HttpChannelListener`1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)
    >   at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
    >   at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
    >   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
    >   at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    >   at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    >   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    ></StackTrace><ExceptionString>System.ServiceModel.FaultException: Access is denied.</ExceptionString></Exception></TraceRecord>
    
  • Community Member Profile Picture
    on at

    hey
    I have gone further
    I created a web.config file inside the dynamics crm installation folder
    (C:\Program Files\Microsoft Dynamics CRM\CRMWeb\XRMServices\2011)
    and put below code in it

    <configuration>
    <system.serviceModel>
      <behaviors>
        <endpointBehaviors>
           <behavior name="Debug">
     	 <serviceDebug includeExceptionDetailInFaults="true" />
    	</behavior>
        </endpointBehaviors>
      </behaviors>
    </system.serviceModel>
    </configuration>


    after that I recalled the organizationData.svc service in my browser I could get the exact error. But I Stuck here again. what does this mean?

    An error has occurred. 
    
     Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support. 
    
     System.Data.SqlClient.SqlException (0x80131904): The target principal name is incorrect. Cannot generate SSPI context. 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 Microsoft.Crm.CrmDbConnection.InternalOpenWithRetry(IDbConnection connection, String descriptionText) at Microsoft.Crm.CrmDbConnection.GetCreateAndOpenConnection() at Microsoft.Crm.CrmDbConnection.Open() at Microsoft.Crm.SharedDatabase.DatabaseMetadata.LoadMetadataXmlFromDatabase(CrmDBConnectionType connectionType, String connectionString, Int32& maxBlobSize) at Microsoft.Crm.ConfigurationDatabase.ConfigurationMetadata.LoadCache(String connectionString) at Microsoft.Crm.ConfigurationDatabase.ConfigurationMetadata.get_Cache() at Microsoft.Crm.SharedDatabase.DatabaseService.Initialize(String tableName) at Microsoft.Crm.SharedDatabase.DatabaseService.RetrieveInternal(String tableName, String[] columns, PropertyBag[] conditions, Nullable`1 top, Nullable`1 offset, IList`1 orderBy, QueryHints hints, IDictionary collectionToFill) at Microsoft.Crm.SharedDatabase.DatabaseService.Retrieve(String tableName, String[] columns, PropertyBag[] conditions) at Microsoft.Crm.ServerLocatorService.GetDeploymentIdFromDatabase() at Microsoft.Crm.ServerLocatorService.TryGetDeploymentId() at Microsoft.Crm.ExceptionConverter.get_NestingDepth() at Microsoft.Crm.ExceptionConverter.ConvertToFault(Exception exception) at Microsoft.Crm.ExceptionConverter.TryConvertToFaultExceptionInternal(Exception exception, Boolean createNewFaultException, FaultException`1& faultException) at Microsoft.Crm.Extensibility.FaultHelper.ConvertToFault(Exception exception) at Microsoft.Crm.Errors.ErrorInformation..ctor(Exception exception, Uri requestUrl, Boolean logError, IOrganizationContext context) at Microsoft.Crm.Errors.ErrorInformation..ctor(Exception exception, Uri requestUrl, IOrganizationContext context) at Microsoft.Crm.MainApplication.Application_Error(Object sender, EventArgs eventArguments) ClientConnectionId:bcd57194-7247-4315-8975-71c583767042 
    


  • abhishek_255 Profile Picture
    1,614 on at

    Hi,

    It seems like the issue is in establishing connection with sql server "The target principal name is incorrect. Cannot generate SSPI context.".

    Please refer some links to troubleshoot the issue-

    blogs.msdn.microsoft.com/.../the-target-principal-name-is-incorrect-cannot-generate-sspi-context

    support.microsoft.com/.../811889

    Hope this helps!

    Best Regards,

    Abhishek

  • Community Member Profile Picture
    on at

    For me, the simple fix was creating a web.config file under the directory C:\Program Files\Microsoft Dynamics CRM\CRMWeb\XRMServices\2011 with the content:

    <configuration>
    <system.serviceModel>
      <behaviors>
        <endpointBehaviors>
           <behavior name="Debug">
     	 <serviceDebug includeExceptionDetailInFaults="true" />
    	</behavior>
        </endpointBehaviors>
      </behaviors>
    </system.serviceModel>
    </configuration>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans