Skip to content

Add docs for .NET SDK hosting integration#694

Merged
adams85 merged 9 commits into
masterfrom
dotnet-sdk-hosting-docs
Jul 13, 2026
Merged

Add docs for .NET SDK hosting integration#694
adams85 merged 9 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.)

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: 6f5351f
Status: ✅  Deploy successful!
Preview URL: https://c81d754c.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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I made an attempt to improve this.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added some code examples.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's mentioned a few line above, plus in the snapshots section.

I think it's pretty self-explanatory and it's also thoroughly documented in the intellisense docs anyway.


## 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it's better this way for discoverability reasons.

## 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch. Fixed.

@adams85 adams85 changed the title [DON'T MERGE YET] Add docs for .NET SDK hosting integration Add docs for .NET SDK hosting integration Jul 13, 2026
@adams85 adams85 merged commit 839a3ea into master Jul 13, 2026
3 of 4 checks passed
@adams85 adams85 deleted the dotnet-sdk-hosting-docs branch July 13, 2026 16:02
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