# Litium App Direct Payment - The SSL connection could not be established, see inner exception

**URL:** <https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [October 4, 2021, 2:02pm UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235 "2021-10-04T14:02:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [October 4, 2021, 2:02pm UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/1 "2021-10-04T14:02:57Z")

</div>

I’m trying to install the pseudo payment provider (Same thing happends with delivery), but get an SSL connection error when trying to add the config file.

I’m running Litium on [https://localhost:44384/](https://localhost:44384/) (started from Visual studio) with a valid development https cert, and added 44388 as port in the docker-compose.yaml for direct-payment.  
The installation of the addon is sucessful. But the error happens when i try to add the config file and klick save.  
Do i need to have the config file in a special location? Right now it’s in ./data/direct-payment/config  
I can’t find any good logs. Looked both in the litium log and in ./data/direct-payment/logs but can’t see anything relevant. Only this below

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/bbe0e347635afab2176f5218842f0f5879fdc5ae.png)

2021-10-04 14:06:37.4503 [App:01] [] [ERROR] [] Litium.Connect.Payments.Communications.Litium.ConnectPayments.IRegistrationService - Cannot assign requested address (localhost:44384) System.Net.Http.HttpRequestException: Cannot assign requested address (localhost:44384)  
—\> System.Net.Sockets.SocketException (99): Cannot assign requested address  
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)  
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)  
at System.Net.Sockets.Socket.g\_\_WaitForConnectWithCancellation|283\_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)  
at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)  
at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)  
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)  
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)  
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)  
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)  
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)  
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)  
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)  
at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)  
at Litium.Connect.Payments.Communications.Litium.LitiumAuthenticationDelegatingHandler.GetOAuth()  
at Litium.Connect.Payments.Communications.Litium.LitiumAuthenticationDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)  
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)  
at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)  
at Litium.Connect.Payments.Communications.Litium.ConnectPayments.ConnectPaymentsClient.PaymentProvider\_GetAsync(String id, String api\_versionQuery, String api\_versionHeader, CancellationToken cancellationToken)  
at Litium.Connect.Payments.Communications.Litium.ConnectPayments.RegistrationService.\<\>c\_\_DisplayClass3\_0.\<g\_\_TryUpdatePaymentProvider|0\>d.MoveNext()  
— End of stack trace from previous location —  
at Litium.Connect.Payments.Communications.Litium.ConnectPayments.RegistrationService.RegisterAsync(PaymentProvider paymentProvider)  
at Litium.Connect.Payments.Infrastructure.PaymentProviderHostedService.StartAsync(CancellationToken cancellationToken)

Litium version: 8

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [October 4, 2021, 2:55pm UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/2 "2021-10-04T14:55:40Z")

</div>

Don’t use “https: // localhost: xxxx” as the domain name, instead use ex [localtest.me](http://localtest.me) addresses that were set up in the step with shared resources. If you use localhost, the application in the container tries to call itself instead of Litium, which means that the connection will never work. 443xx ports are reserved for IIS Express and they do not allow you to use any other domain name than just localhost.

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [October 4, 2021, 3:43pm UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/3 "2021-10-04T15:43:44Z")

</div>

Is there any more documentation on how to get [customer.localtest.me:45678](http://customer.localtest.me:45678) to work?

Or should that “just work” if the docker file is correct and [customer.localtest.me](http://customer.localtest.me) is added to domain names in Litium?  
Or should it be hosted in the iis manager for that to work?

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [October 5, 2021, 7:31am UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/4 "2021-10-05T07:31:42Z")

</div>

I managed to run it on iis so I have not tested any other way.  
Take a look here:

> **[Host ASP.NET Core on Windows with IIS](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-5.0)**
>
> Learn how to host ASP.NET Core apps on Windows Server Internet Information Services (IIS).

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [October 5, 2021, 7:49am UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/5 "2021-10-05T07:49:02Z")

</div>

Can you please provide more information about this for developers?

It’s no problem to host it in IIS, but I only manage to get it to work when i publish the site to IIS.  
And we can’t do that as developers, we have to be able to debug and reload on every build. Not after every publish.

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [October 5, 2021, 8:37am UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/6 "2021-10-05T08:37:14Z")

</div>

I create a site on iis and point it to the MVC folder as we did in previous versions but for that approach iis needs a web.config so you need to generate a web.config for iis to understand. But of course now you have more options with .net core and kestrel so you can run without iis also.

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [October 5, 2021, 7:15pm UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/7 "2021-10-05T19:15:32Z")

</div>

> [@Ericsj11](#):
>
> Can you please provide more information about this for developers?

In the above link you can find the subpage [Development-time IIS support in Visual Studio for ASP.NET Core | Microsoft Docs](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-5.0) that describe how you setting up IIS, adding the workload for Visual Studio that is needed and how to create the IIS launch profile to make it work for “Start debugging”

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [October 7, 2021, 6:16am UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/8 "2021-10-07T06:16:33Z")

</div>

Thanks for the help. That **Development time IIS support** really helped.

I have figured out our problem now. Apperently our internal IT is doing something (know idea what yet), but it’s messing with docker, so the app urls wont work and host.docker.internal can’t be reached. So this is causeing alot of confuson.  
But i got it working without any issues on a computer not connected to our company. So I will talk to them and see whats going on.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [November 4, 2021, 6:16am UTC](https://forum.litium.com/t/litium-app-direct-payment-the-ssl-connection-could-not-be-established-see-inner-exception/2235/9 "2021-11-04T06:16:43Z")

</div>

Closed on November 4, 2021, 6:16am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
