How to enable SSL in locahost using Visual Studio 2017?


Hello, I was trying to Enable SSL in localhost, means want to turn http into https in localhost , while debuggind code in Visual Stduio 2017, how can I enable this in Visual Studio 2017 community edition?


Asked by:- Vinnu
1
: 7440 At:- 7/13/2018 11:00:59 AM
Visual Studio localhost ssl certificate localhost ssl







2 Answers
profileImage Answered by:- vikas_jk

To enable SSL in localhost for Visual Studio 2017 & ASP.NET MVC project, follow these steps

  1. Select your Project by highlighting it.
  2. Then click "F4" and open properties pane.
  3. In project properties make "SSL Enabled"=> True
  4. Set the Valid Port fromt 44300 - 44399 , like https://localhost:44300/
  5. Build and run your project in browser

Here is the image for reference.

enable-ssl-in-visual-studio-2017-min.png

For ASP.NET CORE 2.0

  1. In Solution Explorer, right click the project > Properties
  2. Select the Debug Tab(on left side)
  3. Scroll down and check Enable SSL

Hope it helps.

 

1
At:- 7/14/2018 7:52:54 AM Updated at:- 7/14/2018 7:53:12 AM
I have tried only MVC solution for enabling SSL in localhost, and it works, thanks 0
By : Vinnu - at :- 7/16/2018 2:48:39 PM


profileImage Answered by:- vikas_jk

If the above solution didn't worked try this for Visual Studio SSL

  • In Solution Explorer, click your project.
  • Hit the F4 key (view properties).
  • Change SSL Enabled to false.
  • Change it back to true. There should be a new SSL URL. Copy it.
  • Paste the new SSL URL into Project URL on Web tab.
  • Click Create Virtual Directory.
  • Click Override application root URL, and paste in SSL URL, then click "Save"
  • Run project using updated URL.

Thanks.

1
At:- 6/15/2022 9:42:20 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use