.Net Core 3.1 The SSL connection could not be established, see inner exception - asp.net-core

I am requesting using X509Certificate2 (test.pfx file). Everything works properly and without problems locally. However, when I upload my project to the server, I get an API error.
The SSL connection could not be established, see inner exception. The credentials supplied to the package were not recognized.
Local https, but the site works on the server http.
Does anyone know what the problem is and how I can solve it?

Related

Deploying .NET 5 to IIS Server with SSL disabled

I am currently working on an .NET 5 & SignalR application and in localhost everything seems to be working fine. When I try to deploy it to IIS pre-production Server which doesn't have a SSL certificate configured, pages other than Login are showing the message "This site can’t provide a secure connection". In the login page from the browser console I can see that most of me javascript and css files aren't loaded with the error "Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR". Also from what I can see after user logs in, the request is redirected to Https.
I have removed app.UseHttpsRedirection(); from the Startup and disabled SSL in the Debug properties of the application. That seems to be a wired behavior because I used to deploy applications in .NET CORE before and didn't have these kind of problems. is there any way around this problem, except configuring an SSL certificate?
From the suggestions in server fault, configuring a self-signed certificate provided by IIS itself seems to be the problem solver. Still I don't get why the application was making that https redirection, but anyways in case someone else has this kind of issue.

Identity Server 4 on IIS

I'm learning Identity Server4, just a simple example. one server one client.
When i run the server on Kestrel, everything is fine.
but if i deploy the server to IIS, when i try to visit a Action with [Authorize] attribute from client, it throws an exception.
IOException: IDX20804: Unable to retrieve document from: 'http://myip:5555/.well-known/openid-configuration'.
InvalidOperationException: IDX20803: Unable to obtain configuration from: 'http://myip:5555/.well-known/openid-configuration'.
even if i can access to http://myip:5555/.well-known/openid-configuration normally.
I searched and tried many solutions but none of them works.
Thanks anyone in advice.
If you are using a certificate check if is trusted certificate on your IIS machine.
How to trust the IIS Express Self-Signed Certificate

Azure app can't connect to external API - Https to Http

My Azure application needs to connect to an API that is deployed on a remote server. The Azure app uses https, while the API uses http. To avoid a mixed content issue, I changed my API address to https. But now I receive the following error:
Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
So in summary, using http for my API gives me a Mixed Content error, and using https for my API gives me an SSL-related error.
Does anyone have experience providing an SSL certificate to an API thats already been deployed? Any advice would be greatly appreciated. Thank you.

- RESTCOMM Client API...over HTTPS/SSL

Recently we have configured SSL to open WSS on our RESTCOMM server, as we got the issue of "getUserMedia()" deprecation issue because of insecure origin issue by chromium fix.
We managed to get WSS working and we can open RESTCOM Admin portal via HTTPs over 8443 port and even OLYMPUS is working too.
But because we have configured a SSL on RESTCOM Server i think even the REST Client API calls need to be on HTTPS too. Am icorrect?
Becuase when we use the HTTP based URLs for programmatically adding clients by invoking REST Client APIs of RESTCOMM, then we are getting SSl certificate issues and the reason for this i think is that we have configured SSL cert to address the getUserMedia() security issue by CHROMIUM fix.
can i request any solution or work around for this pls.
thanks in advance
ias

Ignoring SSL Errors with Flurl in Xamarin

I would like to have Flurl and the underlying HttpClient library ignore SSL errors so I can dev locally.
Specifically, I have a web api that requires a SSL certificate. I create a temporary one so I can dev locally, however Flurl and HttpClient return an error on the SSL check.
How can I disable the SSL error check?