Dynamics 365 for CRM:CRM与ADFS安装到同一台服务器,需修改ADFS服务端口号

CRM与ADFS安装到同一台服务器时,出现PluginRegistrationTool 及 CRM Outlook Client连接不上,需要修改ADFS的服务端口号,由默认的808修改为809:

Powershell command : Set-ADFSProperties –nettcpport 809.

CRM Outlook Client中配置报错如下:

16:27:19|   Info| Error connecting to URL: https://crmorg.domain.com:5555/XRMServices/2011/Organization.svc Exception: Microsoft.Crm.CrmException: Authentication failed
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvider`1.SignIn(AuthUIMode uiMode, IClientOrganizationContext context, Control parentWindow, Boolean retryOnError)
   在 Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo`1.DeploymentInfo`1.LoadOrganizationsInternal(AuthUIMode uiMode, Control parentWindow)
   在 Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo`1.InternalLoadOrganizations(DataCollection`1 orgs, AuthUIMode uiMode, Control parentWindow)
16:27:19|  Error| Dynamic Help Link: http://go.microsoft.com/fwlink/?LinkID=398563&lcid=804&cv=8.2.2.112&opsys=10.0.16299.0&cid=dbbeff68-dce6-4bce-9c4e-0052e3c53454&client=Outlook&error=Microsoft.Crm.CrmException%3a80044311&method=MarshaledInvoke&st=   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvider`1.SignIn(AuthUIMode uiMode, IClientOrganizationContext context, Control parentWindow, Boolean retryOnError)
   at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo`1.DeploymentInfo`1.LoadOrganizationsInternal(AuthUIMode uiMode, Control parentWindow)
   at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo`1.InternalLoadOrganizations(DataCollection`1 orgs, AuthUIMode uiMode, Control parentWindow)&orgType=CRM On-Premise

PluginRegistrationTool连接报错如下:

Source : Microsoft.Xrm.Sdk
Method : GetIssuerEndpoint
Date : 2018/3/29
Time : 16:35:22
Error : The authentication endpoint Username was not found on the configured Secure Token Service!
Stack Trace : 在 Microsoft.Xrm.Sdk.Client.IssuerEndpointDictionary.GetIssuerEndpoint(TokenServiceCredentialType credentialType)
   在 Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateInternal(AuthenticationCredentials authenticationCredentials)
   ......

参考诊断信息:

Exception details: System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:808. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. —> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted

ADFS & Dynamics CRM was installed on the same box in this case and so the Sandbox Service was running on this server. Incidentally the port being used by Sandbox Service & ADFS is the same port 808 and therefore the conflict in starting the mex endpoint.

The solution then was to change the ADFS service port from 808 to another one.

To change port, we can use the below powershell command. Here, we are setting port as 809 for ADFS service.

上一篇:Twitter Bootstrap JavaScript插件


下一篇:mysql时间比较