I am working on a Microsoft Dynamics CRM 2016 version 8.2 on-premises environment with separate front-end, async and sql servers to support the deployment. This deployment is NOT Internet Facing, is NOT using Claims-based authentication, and instead is using Windows Authentication. There are no issues with anyone logging in - all users can log into the system and use the system as expected.
However, we get a platform error when we publish all customizations. This error does not prevent the actual customizations from being published, but an error is thrown to the user and there is no log to download.
The Trace Logs show the following:
System.Security.Authentication.AuthenticationException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Authentication failed on the remote side (the stream might still be available for additional authentication attempts).</Message><StackTrace> at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeAcceptor.OnAcceptUpgrade(Stream stream, SecurityMessageProperty&amp; remoteSecurity)</StackTrace><ExceptionString>System.Security.Authentication.AuthenticationException: Authentication failed on the remote side (the stream might still be available for additional authentication attempts). ---&gt; System.ComponentModel.Win32Exception: The target principal name is incorrect
--- End of inner exception stack trace ---
We have Service Principal Names set for the front-end server. These are required for users to log in.
We have attempted to:
1. Add a SPN for the async server. Did not help this issue.
2. Add a SPN for the Service Account running the Async service against the async server.
Neither of these solved this issue.
If anyone happens to have seen this issue before and solved it, please let us know. Thanks very much!