WCF / USD / Dynamics 365:SchUseStrongCrypto 在一段时间后失效
WCF / USD / Dynamics 365: SchUseStrongCrypto loses effect after some time
我知道这似乎是一个老问题,但我认为历史上没有人遇到过同样的问题。
我向 IOrganizationService.Create
发送了 Dynamics 365 版本 9 的请求,测试似乎在重复了十几次之后是可重复的。在某个时候它不再起作用,我必须重新启动 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)
我已经验证了所有这些条件:
- 测试机器是Windows7 Professional Version 6.1 Build 7601 Service Pack 1, 64位
SchUseStrongCrypto
在 HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
和 HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319
下都设置为 1
- exe 是 Unified Service Desk 3.2,目标是“.NETFramework,Version=v4.6.2”
- 此软件已将 dll 编译为目标“.NETFramework,版本=v4.5.2”
- 在我的
UnifiedServiceDesk.exe.config
我有:<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
我还应该检查什么?
谢谢
我在代码的某处有这样一行:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;
这样解决了:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls12;
无论如何,最佳解决方案是隔离应用程序域中的代码。
我知道这似乎是一个老问题,但我认为历史上没有人遇到过同样的问题。
我向 IOrganizationService.Create
发送了 Dynamics 365 版本 9 的请求,测试似乎在重复了十几次之后是可重复的。在某个时候它不再起作用,我必须重新启动 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)
我已经验证了所有这些条件:
- 测试机器是Windows7 Professional Version 6.1 Build 7601 Service Pack 1, 64位
SchUseStrongCrypto
在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”
- 此软件已将 dll 编译为目标“.NETFramework,版本=v4.5.2”
- 在我的
UnifiedServiceDesk.exe.config
我有:<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
1
我还应该检查什么?
谢谢
我在代码的某处有这样一行:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;
这样解决了:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls12;
无论如何,最佳解决方案是隔离应用程序域中的代码。