Home » Categories » Multiple Categories |
How to solve the Let’s Encrypt SSL on ASP.NET Core |
Article Number: 314 | Rating: 4/5 from 1 votes | Last Updated: Mon, Jul 17, 2017 at 7:07 AM
|
Problem: Let's Encrypt SSL fails to work even it has been activated on the Control Panel Solution: This solution applies to ASP.NET Core application with MVC The problem is that Let's Encrypt SSL targets a folder .well-know inside the application. As it does not exist on the httpdocs, and that no route is targeting it, MVC will return a 404 error message and then SSL Certificate will not work. So the trick is to add the following code on the configure method from startup.cs
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @".well-known")),
RequestPath = new PathString("/.well-known"),
ServeUnknownFileTypes = true // serve extensionless file
});
And you also need to add the folder to the root of the website As Let's Encrypt SSL is a new feature to the Plesk Control Panel, occasionally, it will not work fine. We still highly recommend our customer to use a paid SSL for higher reliability and security reason If there is any further issue, please open a support ticket via our Help Desk System |
Attachments
There are no attachments for this article.
|
I am unable to renew my Let’s Encrypt SSL
Viewed 2174 times since Thu, Aug 23, 2018
How do I query MySQL Database in PHP ?
Viewed 3178 times since Tue, May 1, 2012
How to Deploy and host .Net Core 2 and Angular 6 app
Viewed 12708 times since Tue, Oct 23, 2018
How to solve ReportViewer error message: "An error has occurred during report processing. Input string was not in a correct format"
Viewed 7950 times since Tue, Jun 18, 2013
How do I send an email from my ASP.NET website by using SMTP Authentication?
Viewed 6267 times since Tue, May 1, 2012
Domain Name Server (DNS) Amplification Attack
Viewed 9270 times since Wed, Oct 15, 2014
Do you support ASP.NET MVC 6?
Viewed 4434 times since Wed, Feb 17, 2016
My site is showing 500 Internal Server error message. What is wrong here?
Viewed 3403 times since Thu, May 3, 2012
How do I redirect a subdomain to a subdirectory?
Viewed 3797 times since Tue, May 1, 2012
HTTP Error 502.5 - Process Failure error message when publishing an ASP.NET Core Website
Viewed 10445 times since Mon, Mar 27, 2017
|