Commit Graph

15 Commits (687474b31c6cd67e093db193f2203bdda8536c91)

Author SHA1 Message Date
Rick Anderson 39b7df2ca8
Remove .min ref from all non-Blazor projects /2 (#26216) 2022-06-23 15:27:45 -10:00
Rick Anderson c5d39d948d
.NET 6 user secrets /4 (#23732)
* .NET 6 user secrets /4

* .NET 6 user secrets /4

* .NET 6 user secrets /4

* .NET 6 user secrets /4

* Apply suggestions from code review

Co-authored-by: Kirk Larkin <6025110+serpent5@users.noreply.github.com>

Co-authored-by: Kirk Larkin <6025110+serpent5@users.noreply.github.com>
2021-11-04 06:09:57 -10:00
Wade Pickett 72a6b93541
Doc sweep fixes (#21851)
* Doc sweep: fix scan issues

* fixed 1100782 and 1100936

* Adding Rick's review suggestions. part 1

* Update aspnetcore/security/anti-request-forgery.md

Added Rick's suggestion.  anti-request-forgery.md

Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>

* anti-request-forgery.md udpate per review feedback.

Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
2021-03-25 09:11:03 -10:00
Scott Addie 0bbf97a9b6
Show how to access user secrets in a Razor Page (#20748) 2020-11-25 12:49:23 -06:00
Kirk Larkin 7410ba1eed
Show AddUserSecrets without CreateDefaultBuilder (#17945) 2020-04-21 19:00:52 -10:00
Scott Addie 6d3ed8ac42
Update app secrets in development for 3.0 (#16045) 2019-12-05 17:07:03 -06:00
Luke Latham 8e6dd4a7f4 Drop version from App package (#8881)
Addresses #8579 

I might be getting the hang of **_find and replace_** now. 😝

This doesn't touch a couple that ref 2.2.0. I'll tidy those up on https://github.com/aspnet/Docs/issues/8518 after 2.2 RTM.
2018-10-06 17:10:28 -10:00
Luke Latham 46f41d4774
Update All and App package versions (#8513) 2018-09-13 11:39:23 -05:00
Luke Latham 1a0f79a8fe
Update All/App package version (#8489) 2018-09-11 08:53:03 -05:00
Scott Addie 4467d7e957
Describe object graph binding for user secrets (#8128)
Fixes https://github.com/aspnet/Docs/issues/7201
Fixes https://github.com/aspnet/Docs/issues/8096

**Internal Review Pages**
* [1.1+](https://review.docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-2.1&tabs=linux&branch=pr-en-us-8128#map-secrets-to-a-poco)
* [1.0](https://review.docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-1.0&tabs=linux&branch=pr-en-us-8128#map-secrets-to-a-poco)
2018-08-17 11:31:27 -05:00
Luke Latham 34b33e245b Add version to App package references (#7551)
Fixes #7532
2018-07-10 22:43:09 -05:00
Scott Addie 0925108946
Correct the API key name in the user secrets doc (#7215) 2018-06-21 14:04:15 -05:00
Scott Addie 59d40b8bfb
Improve the secrets connection string example (#6908)
* Improve the secrets connection string example

* Update highlighted line numbers in 1.1 sample

* React to feedback
2018-06-06 16:54:41 -05:00
Luke Latham b9c408f82a App secrets update (#6528)
Fixes #6523

[Internal Review Topic](https://review.docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-1.0&branch=pr-en-us-6528)

Tiny nits in the app secrets update: "or later" and a couple of comma splices.

What I wrote for another version of this was more explicit. I'm concerned that the current version doesn't tell devs exactly why/how `AddUserSecrets` is added, and it doesn't say that if `CreateDefaultBuilder` isn't used that they'll still need to do it manually.

Starting with ...

> \- Add the user secrets configuration source to the `Startup` constructor:

> Add the user secrets configuration source with a call to \[AddUserSecrets](/dotnet/api/microsoft.extensions.configuration.usersecretsconfigurationextensions.addusersecrets) in the `Startup` constructor:
>
> \[!code-csharp\[](app-secrets/samples/1.1/UserSecrets/Startup.cs?name=snippet_StartupConstructor&highlight=5-8)]
> ::: moniker-end
> ::: moniker range=">= aspnetcore-2.0"
> When a project calls \[CreateDefaultBuilder](/dotnet/api/microsoft.aspnetcore.webhost.createdefaultbuilder) to initialize a new instance of the host with preconfigured defaults, \[AddUserSecrets](/dotnet/api/microsoft.extensions.configuration.usersecretsconfigurationextensions.addusersecrets) is called when the \[EnvironmentName](/dotnet/api/microsoft.aspnetcore.hosting.ihostingenvironment.environmentname) is \[Development](/dotnet/api/microsoft.aspnetcore.hosting.environmentname.development):
>
> \[!code-csharp\[](app-secrets/samples/2.1/UserSecrets/Program.cs?name=snippet_CreateWebHostBuilder&highlight=2)]
>
> When `CreateDefaultBuilder` isn't called during host construction, add the user secrets configuration source with a call to \[AddUserSecrets](/dotnet/api/microsoft.extensions.configuration.usersecretsconfigurationextensions.addusersecrets) in the `Startup` constructor:
>
> \[!code-csharp\[](app-secrets/samples/1.1/UserSecrets/Startup.cs?name=snippet_StartupConstructor&highlight=5-8)]
> ::: moniker-end

Snippet the call to `CreateDefaultBuilder` to show it (line 2 is highlighted) ...

```csharp
#region snippet_CreateWebHostBuilder
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
    WebHost.CreateDefaultBuilder(args)
        .UseStartup<Startup>();
#endregion
```

... and the sample naming issue remains ("1.1" and "2.1" instead of "1.x" and "2.x").

If anything here looks good, I can mod this branch to make additional updates. Otherwise, nevermind. Just spit-ball'in here.
2018-05-22 13:43:02 -05:00
Scott Addie 8d6d49eb3b Update user secrets doc to 2.x (#6373)
* Update user secrets doc to 2.x

* Introduce another section for adding secrets

* More changes

* More changes

* Add CLI output

* Document more CLI command options

* Add installation note about .NET Core SDK 2.1

* More changes

* Indent code snippets within tabs

* Dedent code snippets

* Add code sample for AddEnvironmentVariables

* Fix code import

* Move text

* Improve examples

* Consolidate csproj files

* Add string replacement section

* Fix code snippet types

* Minor tweaks

* More changes

* Swap ordering of sections

* Move help command out of tabs

* Simplify installation instructions

* Indent command

* Simplification

* More simplification

* React to feedback
2018-05-16 13:33:38 -10:00