WCF / USD / динамика 365: SchUseStrongCrypto теряет эффект через некоторое время - PullRequest
0 голосов
/ 17 октября 2018

Я знаю, что это может показаться старым вопросом, но я не думаю, что у кого-то была такая же проблема в истории.

Я отправляю запрос в Dynamics 365 версии 9 на IOrganizationService.Create, и тестповторяется после того, что, кажется, десятки раз.В определенный момент он больше не работает, и я должен перезапустить USD.

Я получаю ошибку:

Exception detail:Error during HTTP request to https://xxxxxxxx.api.crm4.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.9002.0. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.  
Server stack trace: 
   in System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   in System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   in System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   in System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   in System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   in System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   in System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   in Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
   in Microsoft.Xrm.Sdk.WebServiceClient.WebProxyClient`1.ExecuteAction[TResult](Func`1 action)
   in Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient.CreateCore(Entity entity)
   in CustomHostedControls.HiddenController.DoAction(RequestActionEventArgs args)
   in Microsoft.Uii.Csr.Aif.HostedApplication.HostedWpfControl.HandleRequestAction(Object sender, RequestActionEventArgs args)

Я уже проверил все эти условия:

  • Тестовый компьютер - Windows 7 Professional Версия 6.1 Build 7601 с пакетом обновления 1 (SP1), 64-битный
  • SchUseStrongCrypto установлен на 1 для HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 и HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319
  • Exe - это Unified Service Desk 3.2, который нацелен на ".NETFramework, Version = v4.6.2"
  • . Это программное обеспечение скомпилировано для целевой библиотеки ".NETFramework, Version = v4.5.2"
  • Inмой UnifiedServiceDesk.exe.config у меня есть: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>

Что еще я должен проверить?

Спасибо

1 Ответ

0 голосов
/ 25 октября 2018

Где-то в коде у меня была такая строка:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;

Решено с этим:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls12;

Оптимальное решение будетв любом случае, чтобы изолировать код в домене приложения.

...