ASP.NET
ASP.NET is Microsoft’s open-source web framework for building modern, high-performance web apps and APIs with .NET. Choose this component when you’re shipping server-rendered sites, REST backends, or full-stack applications that benefit from the .NET ecosystem and tooling. Diploi handles the build/publish pipeline and runs your ASP.NET app as a service with the runtime and networking it needs.
Add to your project
Section titled “Add to your project”Paste this entry into the components list in diploi.yaml to add ASP.NET to your project.
components: - name: ASP.NET identifier: asp package: https://github.com/diploi/component-asp#v10.0-05.2026ASP.NET reference
Section titled “ASP.NET reference”Readme
Section titled “Readme”Operation
Section titled “Operation”Getting started
Section titled “Getting started”- In the Dashboard, click Create Project +
- Under Pick Components, choose ASP.NET. Here you can also add a frontend framework to create a monorepo app
- In Pick Add-ons, you can add one or multiple databases to your app
- Choose Create Repository to generate a new GitHub repo
- Finally, click Launch Stack
Link to the full guide - upcoming
Development
Section titled “Development”During development, the container uses dotnet watch to enable automatic reloads when files change. The development server is started with:
dotnet watch --no-launch-profile --hot-reload --non-interactiveThis will:
- Use
dotnet watchto monitor for changes to C# source files and restart the server when changes are detected. - Run the ASP.NET application with hot reload enabled.
- Start the app on port 5103.
- Avoid using any launch profile so environment variables are controlled by the container.
Installing Packages
Section titled “Installing Packages”NuGet packages (C# libraries and frameworks):
dotnet add package <PackageName>For example:
dotnet add package Newtonsoft.Jsondotnet add package Microsoft.EntityFrameworkCore.SqlServerImportant: After running
dotnet add package <PackageName>, always rundotnet buildto resolve new dependency update.
Production
Section titled “Production”Builds a production-ready image. During the build, dependencies are restored with dotnet restore and the application is published with dotnet publish. When the container starts, it runs:
dotnet component-asp.dllThis uses the compiled .NET application optimized for production deployment.
Data Protection
Section titled “Data Protection”The application uses ASP.NET Core Data Protection for securing authentication cookies and anti-forgery tokens. In Kubernetes deployments, data protection keys are persisted using a PersistentVolumeClaim to ensure session continuity across pod restarts.