Skip to content

[DON'T MERGE YET] Add docs for .NET SDK hosting integration#694

Open
adams85 wants to merge 8 commits into
masterfrom
dotnet-sdk-hosting-docs
Open

[DON'T MERGE YET] Add docs for .NET SDK hosting integration#694
adams85 wants to merge 8 commits into
masterfrom
dotnet-sdk-hosting-docs

Conversation

@adams85

@adams85 adams85 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Describe the purpose of your pull request

Adds docs for the new .NET SDK integration with Microsoft.Extensions.*.

Also, does some minor corrections in other SDK references.

(The errors reported by the "Validate Document" check are expected.)

Don't merge this before configcat/.net-sdk#140 is released.

Related issues (only if applicable)

https://trello.com/c/8kt5LPsU

How to test? (only if applicable)

Another version of the .NET SDK Reference has been created under the name "ASP.NET Core & DI-Based Apps". Mostly it's the same content but there are some differences in text, code samples and links.

Requirement checklist

  • I have validated my changes on a test/local environment.
  • I have tested that the code snippets I added work. (Leave unchecked if there are no new code snippets.)
  • I have added my changes to the V1 and V2 documentations.

@adams85 adams85 requested a review from a team as a code owner June 18, 2026 18:33
@adams85 adams85 changed the title Add docs for .NET SDK hosting integration [DON'T MERGE YET] Add docs for .NET SDK hosting integration Jun 18, 2026
@adams85 adams85 marked this pull request as draft June 18, 2026 18:34
@adams85 adams85 force-pushed the dotnet-sdk-hosting-docs branch from 4ddc590 to 42c6f5e Compare June 19, 2026 07:47
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploying configcat-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 408a801
Status: ✅  Deploy successful!
Preview URL: https://cbb73fa2.docs-xmy.pages.dev
Branch Preview URL: https://dotnet-sdk-hosting-docs.docs-xmy.pages.dev

View logs

@adams85 adams85 marked this pull request as ready for review June 19, 2026 07:50
@adams85 adams85 force-pushed the dotnet-sdk-hosting-docs branch from bb9d605 to 408a801 Compare July 3, 2026 09:12
</TabItem>
</Tabs>

If your application needs to use multiple ConfigCat configs, it is possible to register additional named clients as follows:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to have some info on how to obtain the client, a link or something to that part of the documentation.
Also, maybe this whole keyed part can be put into an advanced section in the documentation and here we should only link to it.

var client = app.Services.GetRequiredService<IConfigCatClient>();
```

Named clients can be resolved similarly, using the `FromKeyedServices` attribute or by

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to have a code example on how to obtain the client in a constructur with a default client and with a keyed client too.

Alternatively, by code:

```csharp
configCatBuilder.UseInitMode(new ConfigCatInitMode.WaitForClientReady(throwOnFailure: false));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to talk a bit about the throwOnFailure parameter here too.


## Sample Applications

Check out our Sample Applications how they use the _ConfigCat SDK_:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As I see the same sample apps are listed for both the DI stuff and the old one. Is this intentional?

## Look under the hood

- <a href="https://github.com/configcat/.net-sdk" target="_blank">ConfigCat .NET SDK on GitHub</a>
- <a href="https://www.nuget.org/packages/ConfigCat.Client" target="_blank">ConfigCat .NET SDK on nuget.org</a>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't we have another package for the generic host one?

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.

2 participants