AL icon indicating copy to clipboard operation
AL copied to clipboard

A secure channel could not be established for SSL / TLS

Open Bobby7878 opened this issue 8 years ago • 5 comments

Hi, I'm getting an error everytime the function client.send() is called: httpclientsend sorrythatdidnt

The problem is, that the URL set in the HttpRequestMessage is a https.

Type: System.Net.WebException Status: SecureChannelFailure Message: The request was aborted: Could not create SSL/TLS secure channel. StackTrace: at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) Source: System HResult: -2146233079

I have tried to obtain a self-signed certificate, but that did not help. Any suggestions?

Thanks!

Bobby7878 avatar Jan 12 '18 17:01 Bobby7878

The server has an Enable SSL setting in its configuration. Have you enabled it?

kalberes avatar Jan 13 '18 15:01 kalberes

When I try to enable SSL in server configuration I get this error ssl cannot When I do it through the CustomSettings.config file and restart the server I get this error in VS Code after restarting the server and publishing vscode ssl I have created a self-signed certificate through the IIS.

Bobby7878 avatar Jan 13 '18 21:01 Bobby7878

Do you have anything in the eventviewer that may help?

kalberes avatar Jan 13 '18 22:01 kalberes

No, the only thing present in the eventviewer is this

Type: Microsoft.Dynamics.Nav.Management.Exceptions.NavCommandException SuppressMessage: False DiagnosticsSuppress: False SuppressExceptionCreatedEvent: False FatalityScope: None Message: SSL cannot be enabled when the certificate is not present. StackTrace: ved Microsoft.Dynamics.Nav.Management.ServerSettings.ConfigureUrlRegistrationCommand.RegisterOnEnableSsl(ServicesConfigurationSettings webServiceConfiguration) ved Microsoft.Dynamics.Nav.Management.ServerSettings.ConfigureUrlRegistrationCommand.OnWebServiceConfigurationChange(ServicesConfigurationSettings webServiceConfiguration, ConfigurationChangeType changeType, String newValue) ved Microsoft.Dynamics.Nav.Management.Cmdlets.SetNavServerConfiguration.InternalProcessRecord() ved Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord() Source: Microsoft.Dynamics.Nav.Management HResult: -2146233088

I have followed these instructions: https://docs.microsoft.com/en-us/dynamics-nav/how-to--configure-ssl-to-secure-the-connection-to-microsoft-dynamics-nav-web-client

Bobby7878 avatar Jan 14 '18 11:01 Bobby7878

It has been a while on this thread. Have you been able to solve your issue?

kalberes avatar Apr 18 '18 17:04 kalberes