Intent.AspNetCore module provides the foundational infrastructure for hosting Web services on ASP.NET Core. It generates the necessary startup configuration, program files, and middleware setup for your Web API applications.
Overview
This module serves as the base layer for all ASP.NET Core web applications generated by Intent Architect. It configures the essential components required for a modern .NET web application including the HTTP request pipeline, middleware, and service configuration.What Gets Generated
The module generates the following key components:Program.cs
The entry point for your ASP.NET Core application using the minimal hosting model:Configuration Files
- ProblemDetailsConfiguration: Configures RFC 7807 Problem Details for HTTP APIs
- Program Partial Classes: Extension points for customizing application startup
Key Features
Modern Hosting Model
Uses the latest .NET minimal hosting model for cleaner, more maintainable code
Middleware Pipeline
Configures the HTTP request pipeline with commonly used middleware
HTTPS Redirection
Built-in support for HTTPS redirection and security
Problem Details
RFC 7807 compliant error responses
Module Settings
Configure the module behavior through the Intent Architect application settings:Enable HTTPS Redirect
Controls if the UseHttpsRedirection behavior is part of the application’s HTTP pipeline
Add Required Attribute To Parameters
Controls whether the [Required] attribute is added to qualifying parameters in generated controllers
Installation
Install the module through the Intent Architect Module Manager:Dependencies
This module depends on:Intent.CommonIntent.Common.CSharpIntent.OutputManager.RoslynWeaverIntent.VisualStudio.Projects
Integration
The AspNetCore module automatically integrates with:Intent.AspNetCore.Controllers- For MVC controllersIntent.AspNetCore.HealthChecks- For health monitoring endpointsIntent.AspNetCore.Swashbuckle- For API documentationIntent.AspNetCore.SignalR- For real-time communicationIntent.OpenTelemetry- For observability
Next Steps
Controllers
Generate ASP.NET Core controllers from your services
Swashbuckle
Add Swagger/OpenAPI documentation to your API
CORS
Configure Cross-Origin Resource Sharing
Health Checks
Monitor your application’s health
