安装CRM需要严格按照CRM部署文档的要求进行,比如设置CRM服务的服务账号一定要加入到CRM所在组织库用户里,不然会遇到下面错误。这个就是传递到SQL 的账号,在SQL那边不识别
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="zh-CN">System.ServiceModel.Security.SecurityNegotiationException: 调用 SSPI 失败,请参见内部异常。 ---> System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 目标主要名称不正确。
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
在 System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
--- 内部异常堆栈跟踪的结尾 ---

Server stack trace: 
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
在 System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
在 System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

Exception rethrown at [0]: 
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 System.ServiceModel.ICommunicationObject.Open()
在 Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
在 Microsoft.Crm.Sandbox.SandboxClientBase`1.get_Proxy()
在 Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest, Object sandboxTraceSettingsObj): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #CEEA8C2A</faultstring><detail><OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ActivityId>a20dae2c-1889-4b5f-8295-78ff630a2b01</ActivityId><ErrorCode>-2147204345</ErrorCode><ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/><Message>System.ServiceModel.Security.SecurityNegotiationException: 调用 SSPI 失败,请参见内部异常。 ---> System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 目标主要名称不正确。
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
在 System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
--- 内部异常堆栈跟踪的结尾 ---

Server stack trace: 
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
在 System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
在 System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

Exception rethrown at [0]: 
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 System.ServiceModel.ICommunicationObject.Open()
在 Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
在 Microsoft.Crm.Sandbox.SandboxClientBase`1.get_Proxy()
在 Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest, Object sandboxTraceSettingsObj): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #CEEA8C2A</Message><Timestamp>2019-03-31T04:08:37.4304876Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource>SdkClientCommunication</ExceptionSource><InnerFault><ActivityId>a20dae2c-1889-4b5f-8295-78ff630a2b01</ActivityId><ErrorCode>-2147220970</ErrorCode><ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/><Message>System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 目标主要名称不正确。
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
在 System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #15A26013</Message><Timestamp>2019-03-31T04:08:37.4304876Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault><ActivityId>a20dae2c-1889-4b5f-8295-78ff630a2b01</ActivityId><ErrorCode>-2147220970</ErrorCode><ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/><Message>System.ComponentModel.Win32Exception (0x80004005): 目标主要名称不正确。: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #4F13A6A7</Message><Timestamp>2019-03-31T04:08:37.4304876Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault i:nil="true"/><OriginalException i:nil="true"/><TraceText i:nil="true"/></InnerFault><OriginalException i:nil="true"/><TraceText i:nil="true"/></InnerFault><OriginalException>System.ServiceModel.Security.SecurityNegotiationException: 调用 SSPI 失败,请参见内部异常。 ---> System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 目标主要名称不正确。
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
在 System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
--- 内部异常堆栈跟踪的结尾 ---

Server stack trace: 
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
在 System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
在 System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

Exception rethrown at [0]: 
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 System.ServiceModel.ICommunicationObject.Open()
在 Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
在 Microsoft.Crm.Sandbox.SandboxClientBase`1.get_Proxy()
在 Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest, Object sandboxTraceSettingsObj)</OriginalException><TraceText>
[RWB2016.Plugins: RWB2016.Plugins.RibbonCustomisationsPlugin]
[ac49cdfa-aeef-e611-81d5-0800278d9765: Ribbon Workbench Action]
Starting sync workflow 'CustomiseRibbon', Id: e9e4f77e-6a53-e911-b0bf-d32dcdc42290
Sync workflow 'CustomiseRibbon' completed successfully
Entered RWB2016.Plugins.RibbonCustomisationsPlugin.Execute(), Correlation Id: b87a612b-7495-413b-a78d-5c60c3f3a6ba, Initiating User: d6489dd6-e621-e911-b0bf-d32dcdc42290
RWB2016.Plugins.RibbonCustomisationsPlugin is firing for Entity: none, Message: rwb_CustomiseRibbon, Correlation Id: b87a612b-7495-413b-a78d-5c60c3f3a6ba, Initiating User: d6489dd6-e621-e911-b0bf-d32dcdc42290
Reading operation
Running method
Exception: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: System.ServiceModel.Security.SecurityNegotiationException: 调用 SSPI 失败,请参见内部异常。 ---> System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 目标主要名称不正确。
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
在 System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
在 System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStream... (错误详细信息等于 Exception details: 
ErrorCode: 0x80044307
Message: System.ServiceModel.Security.SecurityNegotiationException: 调用 SSPI 失败,请参见内部异常。 ---> System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 目标主要名称不正确。
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
在 System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
在 System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
在 System.ServiceModel.Channe...)。, Correlation Id: b87a612b-7495-413b-a78d-5c60c3f3a6ba, Initiating User: d6489dd6-e621-e911-b0bf-d32dcdc42290
Exiting RWB2016.Plugins.RibbonCustomisationsPlugin.Execute(), Correlation Id: b87a612b-7495-413b-a78d-5c60c3f3a6ba, Initiating User: d6489dd6-e621-e911-b0bf-d32dcdc42290
</TraceText></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>