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 1921 times since Thu, Aug 23, 2018
Domain Name Server (DNS) Amplification Attack
Viewed 9069 times since Wed, Oct 15, 2014
Sample Code to Send email using ASP.NET1.1
Viewed 4958 times since Tue, May 1, 2012
How do I query MySQL database in ASP.NET?
Viewed 12127 times since Tue, May 1, 2012
I get an error Server.CreateObject Failed when I try to use CDONTs. What can I do?
Viewed 2508 times since Tue, May 1, 2012
How To Solve Problem with Connection String on EF (Entity Framework) 4 or above
Viewed 31240 times since Mon, Apr 1, 2013
How can I enable ASP.NET 3.5 on your Control Panel?
Viewed 3462 times since Wed, May 2, 2012
I cannot find a way to enable ASP.NET 4.5 on my Control Panel
Viewed 10568 times since Tue, Sep 11, 2012
How to Solve the error: "405 - HTTP verb used to access this page is not allowed"?
Viewed 4502 times since Wed, Oct 24, 2018
My website session times out earlier than expected. Why?
Viewed 4560 times since Tue, May 1, 2012
|