Aller au contenu principal
ProduitsOutils de bureauTASTECADConsultation de plansTASTEFILESGestion de fichiersTASTEFTPTransfert de fichiersTASTESSHEspace de travail à distanceTASTEZIPCompression et extractionTASTEWINMGestion de fichiersOutils pour développeursTASTECODEEnvironnement de développement intégré pour RustTASTESTUDIOEnvironnement intégré de développement et de testTASTEETLIntégration de données (ETL)ServeursTASTEREMOTEServeur de bureau à distanceTASTEGEOServeur géospatialTASTEMAILEspace de travail e-mailInvestissementTASTESTOCKApplication de bureau de trading automatique d'actionsCommencerTéléchargementsDocumentationAcheterTous les produits
Marketplace
Actualités
TechActualitésL’actu dev du jourDocs développeursLangages de programmationRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks front-end webNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks serveurSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks d'applications et de bureauTauriFlutterReact NativeElectronAlgorithmesBases des algorithmesAlgorithmes essentielsAlgorithmes avancésAlgorithmes pratiques
CommunautéProjetsJournaux de développementPromptsProblèmes d’outils d’IAVitrineGuide de la communauté
CollaborerTransfert techniqueRéalisation de site webRéalisation d'application de bureauChaîne de publication et de paiementPartenaire commercialContact
ServicesBureau à distancePaquets d'installation sur mesure
TASTEDEV
Produits

Outils de bureau

TASTECADDes plans complexes, ouverts en toute légèretéTASTEFILESSeulement les fichiers utiles, au plus viteTASTEFTPLe chemin le plus net pour vos fichiersTASTESSHEntre vos serveurs et vous, un lien plus solideTASTEZIPCompresser plus vite, extraire en toute sécuritéTASTEWINMUn gestionnaire de fichiers à deux volets, pensé pour le clavier

Outils pour développeurs

TASTECODEModifier, compiler, déboguer et tester vos apps Rust dans une seule fenêtreTASTESTUDIODe l’édition aux tests à distance et aux corrections IA approuvéesTASTEETLDéplacer les données, les valeurs sous les yeux

Serveurs

TASTEREMOTEUn bureau à distance hébergé sur votre propre serveurTASTEGEOUn serveur géospatial compatible GeoServer, reconstruit en RustTASTEMAILReprenez la maîtrise de vos e-mails

Investissement

TASTESTOCKDu trading automatique d'actions selon vos règles : quand, et quoi

Commencer

TéléchargementsDernières versions de chaque produitDocsUtiliser chaque produitAcheterAbonnements et licences perpétuellesTous les produitsTous les produits en un coup d’œil
Tous les produits
MarketplaceActualités
Tech

Actualités

L’actu dev du jourAnnonces officielles : langages, frameworks, GitHub et IADocs développeursGuides des langages, frameworks et algorithmes

Langages de programmation

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks front-end webNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks serveurSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks d'applications et de bureauTauriFlutterReact NativeElectron

Algorithmes

Bases des algorithmesAnalyse de complexité · Tri · Recherche · Structures de données de base · Arbres et tasAlgorithmes essentielsParcours de graphe · Plus courts chemins et arbres couvrants · Programmation dynamique · Algorithmes gloutons · Diviser pour régner · Backtracking (retour sur trace)Algorithmes avancésAlgorithmes sur les chaînes · Mathématiques et théorie des nombres · Manipulation de bits · Arbres de segments · Union-FindAlgorithmes pratiquesStratégie pour les entretiens de codage · Cache LRU · Limitation de débit · Hachage cohérent
Toute la documentation de développement
Communauté
ProjetsDécouvrir les créateurs et leurs travauxJournaux de développementDécisions et enseignementsPromptsInstructions réutilisablesProblèmes d’outils d’IAProblèmes et contournements de Claude, Codex, GeminiVitrineRéalisations terminéesGuide de la communautéConstruire en toute transparence
Collaborer
Transfert techniqueApplications natives en Rust et eguiRéalisation de site web10 langues, comptes, documentation et téléchargementsRéalisation d'application de bureauRust et egui, sans WebViewChaîne de publication et de paiementSignature, MSI, deb, rpm, AppImage, empreintesPartenaire commercialRecommandez-nous, touchez 30 %ContactDéveloppement, partenariats, investissement
Services
Bureau à distanceAccédez à votre ordinateur depuis le navigateurPaquets d'installation sur mesureSeulement l'utile, réglages préchargés
Acheter
FR
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Se connecter
Se connecter
TASTEDEV

Des petits outils à un meilleur développement.

support@tastedev.netSoutenir TASTEDEV
ProduitsGamme de produitsAcheterDocsTéléchargementsMarketplaceAssistance
CommunautéProjetsJournaux de développementPromptsProblèmes d’outils d’IAVitrine
RèglesÀ proposPolitique de confidentialitéConditions d'utilisationConditions d’abonnementRemboursementRègles de la communauté
CompteSe connecterS'inscrire
Visiteurs
Aujourd’hui
Hier
Vues au total
Société
GXSOFT
Représentant
CHOI YOUNG GU
Numéro d’enregistrement
853-44-00368
Adresse
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Téléphone
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsable de la confidentialité
CHOI YOUNG GU

© 2026 TASTEDEVLes informations produit s'appuient sur des sources de développement vérifiées.Publié · en amélioration

Documentation ASP.NET Core
ASP.NET Core
Getting Started with ASP.NET CoreProject Structure and ConfigurationCore ConceptsData, Validation and AuthenticationTestingDeployment
Discussions

Guide ASP.NET Core · 6/6

Deployment

Ce chapitre n'est disponible qu'en anglais pour le moment.

An ASP.NET Core app is a regular process that hosts the Kestrel web server. Deploying it means publishing the compiled output, running it with production configuration, and usually placing it behind a reverse proxy or inside a container.

dotnet publish

# framework-dependent: the server needs the ASP.NET Core runtime
dotnet publish -c Release -o ./publish
dotnet ./publish/TodoApi.dll

# self-contained for Linux x64: the runtime is included
dotnet publish -c Release -r linux-x64 --self-contained -o ./publish
./publish/TodoApi
ModeAdvantagesTrade-offs
Framework-dependentsmall output; runtime patched separatelyruntime must be installed on the server
Self-containedno runtime needed on the serverlarger output; you ship runtime updates

Minimal API apps can also be published with Native AOT (<PublishAot>true</PublishAot>, or the webapiaot template) for fast startup and a small footprint, with some limits such as no MVC controllers.

Production configuration

The environment defaults to Production. Supply secrets and connection strings through environment variables or a secret store, and choose the listening address with ASPNETCORE_URLS or ASPNETCORE_HTTP_PORTS:

export ConnectionStrings__Default="Host=db;Database=todo;Username=app;Password=change-me"
export ASPNETCORE_URLS="http://127.0.0.1:5000"
dotnet ./publish/TodoApi.dll

Kestrel behind a reverse proxy

Kestrel is production-ready, but a reverse proxy such as Nginx, Apache, IIS or a cloud load balancer often terminates TLS, hosts several sites on one IP and adds request limits. Because the proxy talks to Kestrel over plain HTTP, the app must read the original scheme and client IP from the X-Forwarded-* headers:

using Microsoft.AspNetCore.HttpOverrides;

builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
    options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
});

var app = builder.Build();
app.UseForwardedHeaders();   // before other middleware

By default only a proxy on the same machine is trusted; if it runs elsewhere, add its address to KnownProxies. A matching Nginx site:

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass         http://127.0.0.1:5000;
        proxy_http_version 1.1;
        proxy_set_header   Host $host;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
    }
}
Des questions sur ce chapitre ?
Chapitre précédentTesting

On Linux, keep the app running with a systemd service:

[Unit]
Description=Todo API

[Service]
WorkingDirectory=/var/www/todoapi
ExecStart=/usr/bin/dotnet /var/www/todoapi/TodoApi.dll
Restart=always
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=ASPNETCORE_URLS=http://127.0.0.1:5000

[Install]
WantedBy=multi-user.target

On Windows, IIS hosts apps through the ASP.NET Core Module, installed with the .NET Hosting Bundle.

Containers

The SDK can build a container image without a Dockerfile:

dotnet publish --os linux --arch x64 /t:PublishContainer -p:ContainerRepository=todoapi -p:ContainerImageTag=1.0
docker run --rm -p 8080:8080 todoapi:1.0

Or write a multi-stage Dockerfile. Match the image tags to the project's TargetFramework:

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app .
USER $APP_UID
ENTRYPOINT ["dotnet", "TodoApi.dll"]

Official .NET images listen on port 8080 by default and include a non-root user (APP_UID). Add a health endpoint for orchestrators and load balancers with builder.Services.AddHealthChecks() and app.MapHealthChecks("/healthz").

Summary

  • dotnet publish produces framework-dependent or self-contained output.
  • Configure production with environment variables; never ship secrets in appsettings.json.
  • Behind a proxy, enable forwarded headers and keep Kestrel on a local address.
  • Containers can be built with /t:PublishContainer or a multi-stage Dockerfile.

Official documentation

  • Host and deploy ASP.NET Core
  • Host ASP.NET Core on Linux with Nginx
  • Configure ASP.NET Core to work with proxy servers and load balancers
  • Containerize a .NET app with dotnet publish
  • ASP.NET Core documentation

0 commentaire

Meilleurs commentairesPlus récents d'abord

Se connecter · Connectez-vous pour laisser un commentaire.