Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wsl/ra #12395

Merged
merged 4 commits into from
May 14, 2019
Merged

Wsl/ra #12395

Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions aspnetcore/getting-started/index.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
title: Get started with ASP.NET Core
author: rick-anderson
description: A quick tutorial that creates and runs a simple Hello World app using ASP.NET Core.
description: A short tutorial that creates and runs a basic Hello World app using ASP.NET Core.
ms.author: riande
ms.custom: mvc
ms.date: 01/15/2019
ms.date: 5/15/2019
uid: getting-started
---
# Tutorial: Get started with ASP.NET Core

This tutorial shows how to use the .NET Core command-line interface to create an ASP.NET Core web app.
This tutorial shows how to use the .NET Core command-line interface to create and run an ASP.NET Core web app.

You'll learn how to:

> [!div class="checklist"]
> * Create a web app project.
> * Enable local HTTPS.
> * Trust the development certificate.
> * Run the app.
> * Edit a Razor page.

Expand All @@ -35,7 +35,7 @@ Open a command shell, and enter the following command:
dotnet new webapp -o aspnetcoreapp
```

## Enable local HTTPS
### Trust the development certificate

Trust the HTTPS development certificate:

Expand Down Expand Up @@ -65,6 +65,8 @@ This command might prompt you for your password to install the certificate on th

# [Linux](#tab/linux)

For Windows Subsystem for Linux, see [Trust HTTPS certificate from Windows Subsystem for Linux](xref:security/enforcing-ssl#wsl).

See the documentation for your Linux distribution on how to trust the HTTPS development certificate.

---
Expand Down Expand Up @@ -96,7 +98,7 @@ In this tutorial, you learned how to:

> [!div class="checklist"]
> * Create a web app project.
> * Enable local HTTPS.
> * Trust the development certificate.
> * Run the project.
> * Make a change.

Expand Down
13 changes: 13 additions & 0 deletions aspnetcore/security/enforcing-ssl.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,19 @@ See [this GitHub issue](https://github.com/aspnet/AspNetCore.Docs/issues/6199).

::: moniker-end

<a name="wsl"></a>

## Trust HTTPS certificate from Windows Subsystem for Linux

The Windows Subsystem for Linux (WSL) generates a HTTPS self-signed cert. To configure the Windows certificate store to trust the WSL certificate:

* Run the following command to export the WSL generated certificate:
`dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p <cryptic-password>`
* In a WSL window, run the following command:
`ASPNETCORE_Kestrel__Certificates__Default__Password="<cryptic-password>" ASPNETCORE_Kestrel__Certificates__Default__Path=/mnt/c/Users/user-name/.aspnet/https/aspnetapp.pfx dotnet watch run`

The preceding command sets the environment variables so linux uses the Windows trusted certificate.
Rick-Anderson marked this conversation as resolved.
Show resolved Hide resolved

## Additional information

* <xref:host-and-deploy/proxy-load-balancer>
Expand Down