Zum Hauptinhalt springen
ProdukteDesktop-WerkzeugeTASTECADZeichnungsprüfungTASTEFILESDateiverwaltungTASTEFTPDateiübertragungTASTESSHRemote-ArbeitsbereichTASTEZIPKomprimieren und EntpackenTASTEWINMDateiverwaltungEntwicklerwerkzeugeTASTECODEIntegrierte Entwicklungsumgebung für RustTASTESTUDIOIntegrierte Entwicklungs- und TestumgebungTASTEETLDatenintegration (ETL)ServerTASTEREMOTERemote-Desktop-ServerTASTEGEOGeodatenserverTASTEMAILE-Mail-ArbeitsbereichInvestierenTASTESTOCKDesktop-App für automatischen AktienhandelErste SchritteDownloadsDokumentationKaufenAlle Produkte
Marktplatz
Neuigkeiten
TechnikNeuigkeitenEntwickler-News von heuteEntwicklerdokuProgrammiersprachenRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb-Frontend-FrameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer-FrameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp- & Desktop-FrameworksTauriFlutterReact NativeElectronAlgorithmenAlgorithmus-GrundlagenKernalgorithmenFortgeschrittene AlgorithmenAlgorithmen für die Praxis
CommunityProjekteEntwicklungslogsPromptsProbleme mit KI-ToolsShowcaseCommunity-Leitfaden
ZusammenarbeitWissenstransferWebsite-AufbauDesktop-App-AufbauRelease- und ZahlungspipelineVertriebspartnerKontakt
DiensteRemote-DesktopIndividuelle Installationspakete
TASTEDEV
Produkte

Desktop-Werkzeuge

TASTECADKomplexe Zeichnungen, mühelos geöffnetTASTEFILESNur die Dateien, die zählen – in BestzeitTASTEFTPDer aufgeräumteste Weg für Ihre DateienTASTESSHDie stärkere Verbindung zu Ihren ServernTASTEZIPSchneller packen, sicherer entpackenTASTEWINMEin tastaturorientierter Dateimanager mit zwei Fenstern

Entwicklerwerkzeuge

TASTECODERust-Apps bearbeiten, bauen, debuggen und testen – alles in einem FensterTASTESTUDIOVom Bearbeiten bis zu Remote-Tests und freigegebenen KI-KorrekturenTASTEETLDaten bewegen, die Werte im Blick

Server

TASTEREMOTEEin Remote-Desktop auf Ihrem eigenen ServerTASTEGEOEin GeoServer-kompatibler Geodatenserver, neu aufgebaut in RustTASTEMAILIhre E-Mail wieder in Ihrer Hand

Investieren

TASTESTOCKAutomatischer Aktienhandel nach Ihren Regeln: wann und was

Erste Schritte

DownloadsNeueste Versionen aller ProdukteDokuSo nutzen Sie jedes ProduktKaufenAbos und DauerlizenzenAlle ProdukteAlle Produkte im Überblick
Alle Produkte
MarktplatzNeuigkeiten
Technik

Neuigkeiten

Entwickler-News von heuteOffizielle Meldungen zu Sprachen, Frameworks, GitHub und KIEntwicklerdokuAnleitungen zu Sprachen, Frameworks und Algorithmen

Programmiersprachen

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web-Frontend-FrameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server-FrameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App- & Desktop-FrameworksTauriFlutterReact NativeElectron

Algorithmen

Algorithmus-GrundlagenKomplexitätsanalyse · Sortieren · Suchen · Grundlegende Datenstrukturen · Bäume und HeapsKernalgorithmenGraphtraversierung · Kürzeste Wege und minimale Spannbäume · Dynamische Programmierung · Greedy-Algorithmen · Teile und herrsche · BacktrackingFortgeschrittene AlgorithmenZeichenkettenalgorithmen · Mathematik und Zahlentheorie · Bitmanipulation · Segmentbäume · Union-FindAlgorithmen für die PraxisStrategie für Coding-Interviews · LRU-Cache · Rate Limiting · Konsistentes Hashing
Alle Entwicklungsdokumente
Community
ProjekteEntwickler und Projekte entdeckenEntwicklungslogsEntscheidungen und ErkenntnissePromptsWiederverwendbare AnweisungenProbleme mit KI-ToolsProbleme und Workarounds für Claude, Codex, GeminiShowcaseFertige ErgebnisseCommunity-LeitfadenWie wir offen entwickeln
Zusammenarbeit
WissenstransferNative Apps mit Rust und eguiWebsite-Aufbau10 Sprachen, Konten, Dokumentation und DownloadsDesktop-App-AufbauRust und egui, ohne WebViewRelease- und ZahlungspipelineSignatur, MSI, deb, rpm, AppImage, PrüfsummenVertriebspartnerEmpfehlen und 30 % erhaltenKontaktEntwicklung, Partnerschaft, Investition
Dienste
Remote-DesktopIhren Computer im Browser erreichenIndividuelle InstallationspaketeNur nötige Funktionen, Einstellungen vorab
Kaufen
DE
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Anmelden
Anmelden
TASTEDEV

Von kleinen Werkzeugen zu besserer Entwicklung.

support@tastedev.netTASTEDEV unterstützen
ProdukteProduktübersichtKaufenDokuDownloadsMarktplatzSupport
CommunityProjekteEntwicklungslogsPromptsProbleme mit KI-ToolsShowcase
RichtlinienÜber unsDatenschutzerklärungNutzungsbedingungenAbo-BedingungenRückerstattungCommunity-Richtlinien
KontoAnmeldenRegistrieren
Besucher
Heute
Gestern
Aufrufe gesamt
Firma
GXSOFT
Vertretungsberechtigt
CHOI YOUNG GU
Handelsregisternummer
853-44-00368
Anschrift
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefon
+82-10-4404-1523
E-Mail
whitecalvin@tastedev.net
Datenschutzbeauftragter
CHOI YOUNG GU

© 2026 TASTEDEVProduktinformationen basieren auf verifizierten Entwicklungsquellen.Veröffentlicht · wird verbessert

ASP.NET Core-Dokumentation
ASP.NET Core
Getting Started with ASP.NET CoreProject Structure and ConfigurationCore ConceptsData, Validation and AuthenticationTestingDeployment
Diskussionen

ASP.NET Core-Anleitung · 2/6

Project Structure and Configuration

Dieses Kapitel ist vorerst nur auf Englisch verfügbar.

This chapter walks through the files of a new project, explains how configuration and environments work, and shows common ways to organize code as the app grows.

Files in a new project

dotnet new webapi -o TodoApi produces:

TodoApi/
├── Program.cs
├── TodoApi.csproj
├── TodoApi.http
├── appsettings.json
├── appsettings.Development.json
├── Properties/
│   └── launchSettings.json
├── bin/
└── obj/
FilePurpose
Program.csEntry point: registers services and builds the request pipeline
TodoApi.csprojProject file: SDK, target framework, NuGet packages
appsettings*.jsonConfiguration, with per-environment overrides
Properties/launchSettings.jsonLocal launch profiles for dotnet run and IDEs
TodoApi.httpSample HTTP requests to send from the editor
bin/, obj/Build output; keep them out of source control

The project file

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

</Project>

Microsoft.NET.Sdk.Web makes this an ASP.NET Core project: it references the shared ASP.NET Core framework and adds web-specific implicit usings. TargetFramework follows the SDK that created the project. Packages are added with the CLI, which writes a PackageReference into this file:

dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet list package

Program.cs in two halves

Every Program.cs has the same shape: register services on the builder, then build the app and describe the pipeline. Services must be registered before Build(); after that the container is read-only.

var builder = WebApplication.CreateBuilder(args);

// 1. Services for the dependency injection container
builder.Services.AddOpenApi();

var app = builder.Build();

// 2. Middleware pipeline and endpoints
if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}

app.UseHttpsRedirection();
app.MapGet("/health", () => "ok");

app.Run();

appsettings.json and environments

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "Default": "Data Source=todo.db"
  },
  "Todo": {
    "PageSize": 20
  }
}
Fragen zu diesem Kapitel?
Vorheriges KapitelGetting Started with ASP.NET CoreNächstes KapitelCore Concepts

The environment name comes from ASPNETCORE_ENVIRONMENT (or DOTNET_ENVIRONMENT). Typical values are Development, Staging and Production; when nothing is set, the app runs as Production. appsettings.{Environment}.json is layered on top of appsettings.json, so it only needs the keys that differ.

The default builder reads configuration in this order, and later sources win:

  1. appsettings.json
  2. appsettings.{Environment}.json
  3. User secrets (in Development only)
  4. Environment variables
  5. Command-line arguments

Nested keys use : in code and on the command line, and __ (double underscore) in environment variables:

export ASPNETCORE_ENVIRONMENT=Staging
export Todo__PageSize=50
dotnet run

# or pass the value as an argument to the app
dotnet run -- --Todo:PageSize=50

Keep secrets out of appsettings.json. During development, the Secret Manager stores them outside the project folder:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:Default" "Host=localhost;Database=todo;Username=dev;Password=dev"

Properties/launchSettings.json holds the local profiles (URLs and environment variables such as ASPNETCORE_ENVIRONMENT=Development). It is used only by dotnet run and IDEs and is not part of the published output, so production settings belong in environment variables or configuration files.

Organizing a growing app

ASP.NET Core does not enforce a folder layout. Common conventions:

  • Endpoints/ or Controllers/: the HTTP surface, grouped by feature
  • Services/: business logic registered in DI
  • Data/: the EF Core DbContext and its Migrations/
  • Models/ or Contracts/: entities and request/response types
  • wwwroot/: static files served by the static file middleware

Larger solutions put the app under src/ and tests under tests/, tied together by a solution file (dotnet new sln, then dotnet sln add). Feature endpoints are often moved out of Program.cs into extension methods:

// Endpoints/TodoEndpoints.cs
public static class TodoEndpoints
{
    public static RouteGroupBuilder MapTodoEndpoints(this IEndpointRouteBuilder app)
    {
        var group = app.MapGroup("/todos");
        group.MapGet("/", () => Array.Empty<string>());
        return group;
    }
}

// Program.cs
app.MapTodoEndpoints();

Summary

  • Program.cs registers services, then builds the middleware pipeline and endpoints.
  • The .csproj file uses the Web SDK; packages come from dotnet add package.
  • Configuration layers JSON files, user secrets, environment variables and arguments; the environment name selects appsettings.{Environment}.json.
  • Folder layout is a team convention; extension methods keep Program.cs short.

0 Kommentare

Top-KommentareNeueste zuerst

Anmelden · Melde dich an, um einen Kommentar zu schreiben.