Skip to content

Conversation

@tdykstra
Copy link
Contributor

@tdykstra tdykstra commented Jan 14, 2025

Fixes #34216


Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/configuration/index.md Configuration in ASP.NET Core

@tdykstra tdykstra requested a review from Copilot January 14, 2025 00:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

aspnetcore/fundamentals/configuration/index.md:63

  • [nitpick] The sentence could be rephrased for clarity: 'Although this article mentions WebApplication.CreateBuilder(args) multiple times, application code should call this method only once.'
> While this article mentions `WebApplication.CreateBuilder(args)` many times, application code should call this method only once.

@tdykstra tdykstra marked this pull request as ready for review January 14, 2025 00:38
Copy link
Contributor

@Rick-Anderson Rick-Anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overreaction to one customer and too much bling. I'd change it to:
Do a search on WebApplication.CreateBuilder(args), all the code samples show it's only called once. This is not a recurrent problem.

NOTE:: WebApplication.CreateBuilder(args) should only be called once.

The 2nd time you call it
var builder = WebApplication.CreateBuilder(

you get a compiler error.
I'm not sure I'd even need a warn. We can't overreact to every error a customer makes and spam the topic with warnings.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

1. [appsettings.json](#appsettingsjson) using the [JSON configuration provider](#jcp).
1. A fallback to the host configuration described in the [next section](#host).

Note: `WebApplication.CreateBuilder(args)` should only be called once.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note: `WebApplication.CreateBuilder(args)` should only be called once.

Many of our docs use the same API many times, for example app.UseCors `https://learn.microsoft.com/en-us/aspnet/core/security/cors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link we originally had here tells why you don't want to call this API multiple times but people tend to think it can or needs to be. Perhaps it would be good to put the link back in?
https://techcommunity.microsoft.com/blog/iis-support-blog/asp-net-core-503-server-has-been-shutdown/3830338

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@tdykstra tdykstra merged commit e84d36f into main Jan 21, 2025
3 checks passed
@tdykstra tdykstra deleted the tdykstra-patch-2 branch January 21, 2025 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

suggest warning on doc page "Configuration in ASP.NET Core"

4 participants