C
C#2y ago
tymonello

❔ Blazor communicate with WebAPI on localhost server

Hello, I want to start making a staging environment for my application, I got a WebAPI ready and working, and I installed it on a ubuntu server in my local network. But when I am calling it from Blazor, I am getting an Error: System.Net.Http.HttpRequestException: The SSL connection could not be established. It works well when I run both API and Blazor on my computer. I have configured NGINX, I can call the API from a browser, first by IP address, then I added it to a DNS on a local domain, it works like that too. I created a self-signed certificate. Because certbot doesn't work for .local domains and IP addresses. But I somehow can't really make it all work together. Sometimes the API works when I add the port it runs on, so it has no certificate, other times it works via the NGINX, when I just enter the address without ports, and shows the certificate in the browser I created, but Blazor still shows the same error. I probably messed up everything by now, so I am looking for a good guide on how to run an API on a Ubuntu server, so that it is exposed on port 80 and 443, and that Blazor can communicate with it.
7 Replies
Relevant
Relevant2y ago
Not using Docker, I assume?
tymonello
tymonelloOP2y ago
not using docker
Relevant
Relevant2y ago
And this is web assembly? Also assuming it's purely an SSL issue. Have you tried disabling SSL to make sure it's isolated to something certificate related?
tymonello
tymonelloOP2y ago
Blazor ServerSide Disable SSL where? In Blazor? In the API?
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
tymonello
tymonelloOP2y ago
No it was not resolved
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server