Individual skill

crestapps-core-aspnet-hosting

Skill for composing CrestApps.Core 2.0 into ASP.NET Core MVC, Razor Pages, Blazor Web App, Minimal API, and .NET MAUI hybrid hosts. Covers Program.cs ordering, AddCrestAppsCore with a store and commit filters, middleware order (UseWebSockets before UseRouting, UseAIAnonymousVisitorCookie, rate limiting), chat hub classes derived from AIChatHubCore and ChatInteractionHubBase with ConfigureCrestAppsChatHubOptions, the WebRTC realtime transport, the document and knowledge-figure endpoints with their resource-based authorization handlers, MCP endpoint mapping, the @crestapps/ai-chat-ui browser assets, live site-settings options through IOptionsMonitor, and which helpers are sample-host code rather than package APIs. Use it when wiring CrestApps.Core into a new or existing web application or troubleshooting host startup.

src/CrestApps.AgentSkills/crestapps-core/crestapps-core-aspnet-hosting/SKILL.md

Read pinned source

Source commit d86d04f234b1b2bd8145368a2544490f9d557596

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Instructions only
Last checked
Nov 6, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
13
Repository last updated
Oct 21, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# CrestApps.Core ASP.NET Hosting

You are a CrestApps.Core expert. Register host services first, compose CrestApps through `AddCrestAppsCore(...)`, then map only the hubs and endpoints for the features the host enables.

## Rules

- Packages go in the web project. Pick a provider package, the feature packages, and one store package (`CrestApps.Core.Data.EntityCore` or `CrestApps.Core.Data.YesSql`) when records must persist.
- The service registrations are identical for MVC, Razor Pages, Blazor and Minimal APIs; only the UI and endpoint layer differs.
- Add a commit boundary for every write path: `AddCrestAppsStoreCommitterFilter()` for MVC, `.AddSignalR(addStoreCommitterFilter: true)` for hubs, `StoreCommitterEndpointFilter` for Minimal API groups, and an explicit `IStoreCommitter.CommitAsync()` in background scopes.
- Call `UseWebSockets()` before `UseRouting()`. HTTP/2 WebSocket handshakes (extended CONNECT) are otherwise rejected with 405, which breaks the realtime WebSocket transport.
- Call `UseAIAnonymousVisitorCookie()` (from `CrestApps.Core.AI.Chat`) after routing and before authentication when anonymous visitors chat, so rate limiting and session reuse get a stable visitor key.
- Every hub type that is mapped needs `ConfigureCrestAppsChatHubOptions<THub>()` (or `ConfigureChatHubOptions<THub>()` on the Chat Interactions builder). `HubOptions<THub>` is per hub type; an unconfigured hub runs on SignalR defaults (one parallel invocation per client), which deadlocks the realtime WebRTC handshake.
- The document and figure endpoints authorize against resources through `IAuthorizationService`. Register `IAuthorizationHandler` implementations that grant the requirements, or every download and upload is forbidden.