Systenics Solutions Logo
  • Home start here
  • Solutions services we provide
  • Products products we build
  • About Us who we are
  • Contact Us request a quote
  • Jobs work for us
  • Blog our views

Blog

Home / Blog

Use Lets Encrypt SSL with AuctionWorx

  • by:
  • in:
  • tags: .NET, C-Sharp
  • 0 Comments

Introduction

While developing ASP.NET or ASP.NET MVC Web or WebAPI applications, we use IIS self-signed certificate to test sites locally or on test servers with HTTPS enabled. Such HTTPS websites throw a warning message when they are accessed first time from any browser. If you are using WebAPI with HTTPS and trying to access those APIs from Ionic or iOS mobile applications, then it will not work. This article focuses on configuration of Let’s Encrypt SSL Certificate with AuctionWorx web application.

What is Let's Encrypt?

Let's Encrypt is a free, automated, and open Certificate Authority.

"To enable HTTPS on your website, you need to get a certificate (a type of file) from a Certificate Authority (CA). Let’s Encrypt is a CA. In order to get a certificate for your website’s domain from Let’s Encrypt, you have to demonstrate control over the domain. With Let’s Encrypt, you do this using software that uses the ACME protocol, which typically runs on your web host."

Read more about Let’s Encrypt from their FAQ or Get Started or How It Works links.

Let's Encrypt

1. Download letsencrypt-win-simple from GitHub and extract it on your server.

2. Run “letsencrypt.exe” and follow instructions or enter following command:

letsencrypt.exe --accepttos --manualhost your_website.com 
--webroot C:\inetpub\wwwroot\your_website_folder

 

It will add a new certificate under IIS > Server Certificates.

img1
Figure 1: IIS > Server Certificates

Copy files into root of your website under following folder ...your_website_folder\.well-known\acme-challenge

3. Now add following NuGet packages into RainWorx.FrameWorx.MVC project.

<?xml version="1.0" encoding="utf-8" ?>
<packages>
    <package id="Microsoft.Owin" version="2.1.0" targetFramework="net452" />
    <package id="Microsoft.Owin.FileSystems" version="3.1.0" targetFramework="net452" />
    <package id="Microsoft.Owin.StaticFiles" version="2.1.0" targetFramework="net452" />
    <package id="Owin" version="1.0" targetFramework="net452" />
</packages>
    

 

4. Add following line into Startup.cs file.

    
using Microsoft.Owin.FileSystems;


public class Startup
{
    public void Configuration(IAppBuilder app)
    {
        app.Map("/.well-known", letsEncrypt =>
        {
            letsEncrypt.Use((context, next) =>
            {
                IFileInfo file;
                var fileSystem = new PhysicalFileSystem(@".\.well-known");
                if (!fileSystem.TryGetFileInfo(context.Request.Path.Value, out file))
                {
                    return next();
                }
                return context.Response.SendFileAsync(file.PhysicalPath);
            });
        });
        GlobalHost.DependencyResolver.UseSqlServer(ConfigurationManager.ConnectionStrings["db_connection"].ConnectionString);
        app.MapSignalR();
    }
}
    

 

5. After adding above code publish a new build and access https://your_website.com and it will show a valid certificate.

Share This Post:

About the Author

This post was written by on Tuesday April 25, 2017.

Related Posts
  • Uncheck Radio Button in WPF - 23 March 2013
  • Integration of Nexmo SMS and Verify API using C# for AuctionWorx - 15 March 2017
  • Enable TLS 1.2 for Authorize.Net and Salesforce API calls - 13 July 2017
  • Use Lucene.Net in for faster data search - 12 February 2017
  • Integrate Salesforce with C# or ASP.NET MVC Application - 15 December 2015
comments powered by Disqus
< Older Newer >
All Categories
  • Programming
  • General
  • DevOps
Tags
  • .NET (9)
  • Ajax (1)
  • Android (3)
  • ASP.NET (1)
  • ASP.NET 4.5 (1)
  • ASP.NET 5 (1)
  • ASP.NET 6 (1)
  • asp.net core (1)
  • ASP.NET MVC (12)
  • AuctionWorx (2)
  • Bootstrap (4)
  • Build and Release (1)
  • CI (1)
  • ClickOnce (1)
  • ClientDependency (1)
  • Code Signing (1)
  • Continuous Integration (1)
  • C-Sharp (9)
  • devops (1)
  • ExpressJS (1)
  • Interview Process (1)
  • iOS (1)
  • Linux (1)
  • Lucene (1)
  • MVC (2)
  • NodeJS (1)
  • Phonegap (3)
  • Razor (4)
  • Salesforce (2)
  • Socket.IO (1)
  • SQL CE 3.5 SP2 (1)
  • SQL Server (1)
  • Sync (1)
  • Sync Framework v2.1 (1)
  • Umbraco 6 (6)
  • Umbraco 7 (4)
  • Visual Studio 2015 (1)
  • Visual Studio Online (1)
  • VMWare ESXI 6.0 (1)
  • WCF (1)
  • Windows (2)
  • WPF (2)

About Us

Systenics Solutions is a customized software development company. We specialize in building Cloud, Web, and Mobile based applications using the latest Cloud Technologies. Our fine-tuned agile processes help you smoothly progress from conceptualizing your ideas, building proto-types/wireframes to bringing your product to market, giving our clients complete visibility and control at all times. We strive to provide our global clients of various sizes with cost effective benefits of offshore development while providing expert technical services.


Microsoft Partner - Gold Cloud Platform

Contact Us

Systenics Solutions

The Affaires, Unit #F-1, 1st Floor, Plot #9, Sector - 17, Opp. Bhumiraj Costarica, Sanpada, Navi Mumbai - 400705, India

 

Telephone: +91-22-2781 0808

Email: info@systenics.com

Skype: saurabhn

Testimonials

"Coming from a non-technical background, Saurabh and his team at Systenics took my business idea and turned it into a fully functional application which surpassed my expectations! You can be sure with them that all your IT related concerns will be covered."

Shobhan, CEO - IITJobs Inc

"The ability Systenics showed in code signing and deploying my click once code in Microsoft visual was truly awesome. I interviewed and tested 6 different development companies and only one was actually able to get the job done - that was Systenics Solutions! Professional, courteous and reliable - I highly recommend them and am very happy and eager to continue growing our business relationship now and in the near future. Thank you Saurabh"

Andre Pierre

I contracted with Systenics about 6 months ago, in an effort to customize auction software for a new company I am launching in the US. The entire process was as smooth as could be. Their estimate for the project was reasonable, and very close to the final number. I would absolutely use this company again, and I have so much confidence in their ability to work with me, I even agreed to a support agreement with them long term. Their ability to communicate with me in the US was always very timely. They listened to my thoughts and ideas, and then suggested some changes, that made my software have even greater value. I cannot thank them enough, and would highly suggest their quality services to anyone. A completely satisfied customer!

Joe Lefebvre - Pharmabid, LLC

Systenics did a great job on our customization , they clearly understood the requirements and completed the task in a timely manner. They were very thorough in project discussions and made sure that we understood how the customization works and suggested improvements when required

Mike Singh - Dr. Liquidator

Copyright © 2012-2018 Systenics Solutions. All rights reserved.

BACK TO TOP