Skip to main content
The 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:
var builder = WebApplication.CreateBuilder(args);

// Add services to the container
builder.Services.AddControllers();

var app = builder.Build();

// Configure the HTTP request pipeline
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();

app.Run();

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

Enable HTTPS Redirect
boolean
default:"true"
Controls if the UseHttpsRedirection behavior is part of the application’s HTTP pipeline

Add Required Attribute To Parameters

Add Required Attribute To Parameters
boolean
default:"false"
Controls whether the [Required] attribute is added to qualifying parameters in generated controllers

Installation

Install the module through the Intent Architect Module Manager:
Intent.AspNetCore

Dependencies

This module depends on:
  • Intent.Common
  • Intent.Common.CSharp
  • Intent.OutputManager.RoslynWeaver
  • Intent.VisualStudio.Projects

Integration

The AspNetCore module automatically integrates with:
  • Intent.AspNetCore.Controllers - For MVC controllers
  • Intent.AspNetCore.HealthChecks - For health monitoring endpoints
  • Intent.AspNetCore.Swashbuckle - For API documentation
  • Intent.AspNetCore.SignalR - For real-time communication
  • Intent.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

Build docs developers (and LLMs) love