I feel like I must be missing something easy, but does anyone know how to enable SSL for IIS Express when using an ASPNET5 web project? The Project Properties Debug screen only shows a port, not a URL ("classic" web projects still allow you to specific https in the url)
To enable the SSL with in IIS Express, you have to just set “SSL Enabled = true” in the project properties window. With this; you can access any of the URL from your browser and run the application. Hope this helps.
Start Visual Studio 2019 and select Create a new project. In the Create a new project dialog, select ASP.NET Web Application (. NET Framework) > Next. In the Configure your new project dialog, enter SSLSample for Project name.
Select the ASP.NET Core project in Visual Studio Solution Explorer and click the Properties icon, or press Alt+Enter, or right-click and choose Properties. Select the Debug tab. In the Properties pane, next to Profile, For IIS Express, select IIS Express from the dropdown.
Edit your applicationhost.config
in [SOLUTION_DIR]\.vs\config
for exemple in the sites section :
<site name="YOUR SITE NAME" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="YOUR SITE PATH" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:localhost" />
<binding protocol="https" bindingInformation="*:44300:localhost" />
</bindings>
</site>
You do this in a vNEXT project almost exactly the same as prior projects. Microsoft just moved the settings to the debug
tab of the project properties.
debug
tab on the leftEnable SSL
Click the project root node in the explorer window, press F4
and adjust the following:
This can be done simply if you click on the project in the Solution Explorer the open the Properties and set the SSL Enabled to True.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With