ASP.NET Core Integration
The Arc provides enhanced capabilities for ASP.NET Core applications, building upon the core Arc features with web-specific functionality. Install Cratis.Arc for this host (Cratis.Arc.Core alone is the lightweight alternative). Register with WebApplicationBuilder.AddCratisArc() and activate with WebApplication.UseCratisArc(). No event store is required. OpenAPI/Swagger have separate optional packages.
Features
Section titled “Features”- Configuration - Configure Arc through appsettings.json or programmatically
- Authorization - Arc role checks versus separately configured ASP.NET endpoint policies
- Microsoft Identity - Integration with Microsoft Client Principal for Azure services
- FromRequest Attribute - Advanced model binding combining multiple HTTP request sources
- Swagger - Enhanced OpenAPI documentation with Arc-specific schema generation
- Validation - Comprehensive validation with FluentValidation support
- Without Wrappers - Control response wrapping behavior for specific endpoints
- Invariant Culture - Configure invariant culture defaults and understand request-level overrides
When to Use ASP.NET Core Integration
Section titled “When to Use ASP.NET Core Integration”Use the ASP.NET Core integration when you need:
- Full web framework capabilities (Kestrel, middleware pipeline, static files)
- Razor views or MVC features
- Swagger UI for API documentation
- Advanced middleware scenarios
- Kestrel’s HTTP server capabilities
- Traditional web application patterns
When to Use Arc.Core Instead
Section titled “When to Use Arc.Core Instead”Consider using Arc.Core (without ASP.NET Core) when you need:
- Minimal dependencies and smaller binary size
- A simplified
HttpListenerhost rather than the ASP.NET middleware ecosystem - A deployment whose performance and Native AOT compatibility you verify with your actual dependencies
- Console applications or background services
- Scenarios where full web framework is unnecessary
See Also
Section titled “See Also”- Arc.Core Overview - Lightweight alternative without ASP.NET Core
- Commands - Command handling patterns
- Queries - Query patterns and conventions
- Tenancy - Tenant isolation and management