For a standard ASP.NET Core application, you do not need a Dockerfile or a container build. Run dotnet publish -c Release, then move the published output to the host you have chosen: an IIS site on Windows, Azure App Service, or a Linux server running the app under Kestrel. The publish step only produces files. The deployment step places those files where they can run, and two decisions determine most of the remaining work: whether the destination already has a compatible .NET runtime, and who keeps the process running.
Scope and versions
These steps cover ASP.NET Core and modern .NET. A project that targets .NET Framework is outside this guide. It may need a Windows-compatible target and different deployment details, so follow the documentation for that framework instead.
The Microsoft Learn pages cited here are published under different ASP.NET Core version selectors: the general hosting page is labeled 7.0, the IIS tutorial 10.0, and the Nginx guide 11.0. Use the version selector on each page that matches your project. The publish command and the broad deployment model are stable across these pages, but platform-specific steps, particularly Linux distribution details, change over time.
Two meanings of “without Docker”
The phrase can mean two different things, and the route depends on which one you need:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11#1 Best Overall
- No containers at all. This is the scope of this guide. You publish the app and copy its output to IIS, App Service, or a Linux host.
- No hand-written Dockerfile. The .NET SDK has its own container-publishing feature that builds a container image without a Dockerfile. It still produces a container image and requires a container runtime, so it is a containerized route, not a folder-based deployment.
Publish and deploy are separate steps
Microsoft describes the split directly in its IIS tutorial: “The publish step is handled by the .NET SDK, while the deployment step can be handled by a variety of approaches” (Microsoft Learn, Publish ASP.NET Core to IIS).
Start with a Release build from the project folder:
dotnet publish -c Release
The output is written to bin/Release/<TFM>/publish/, where <TFM> is your project’s target framework moniker. For a project targeting net8.0, the folder is bin/Release/net8.0/publish/. Check the TargetFramework value in your .csproj if you are unsure. A successful publish does not make the app production-ready; the destination still needs a compatible runtime or self-contained output, configuration, process supervision, and networking.
Choose framework-dependent or self-contained output
The output model decides what the destination must already have installed. The table summarizes the three options Microsoft documents.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRank #3
| Output | Typical command or setting | Runtime on the target | Platform-specific? | Trade-offs stated by Microsoft |
|---|---|---|---|---|
| Framework-dependent | dotnet publish -c Release |
Must already be installed (a compatible .NET runtime) | No | Smaller output because the runtime is not bundled. Microsoft’s IIS tutorial recommends it for most IIS deployments when the .NET Hosting Bundle supplies the runtime. |
| Self-contained | dotnet publish -c Release -r <RID> --self-contained true |
Included in the published output | Yes, for the chosen operating system and architecture | The target does not need the runtime preinstalled, but the output must match the target platform. |
| Single-file | Add -p:PublishSingleFile=true to the publish command |
Set by the other options you choose; not stated as a separate rule in the cited pages | Yes | Microsoft identifies larger output and possible startup overhead. It is packaging, not a substitute for a container image. |
For a self-contained build, replace <RID> with the runtime identifier of the target, such as linux-x64 or win-x64:
dotnet publish -c Release -r <RID> --self-contained true
Microsoft’s deployment overview covers these options in more detail (Microsoft Learn, .NET application deployment).
Rank #4
Deployment routes
IIS on Windows
- Install the current .NET Hosting Bundle on the IIS server. It supplies the runtime and the ASP.NET Core Module that a framework-dependent app needs.
- In IIS Manager, create a site and set its physical path to the directory where the app will live.
- Publish in Release mode, then copy the contents of the publish folder into that site directory. Do not copy the
publishfolder itself as a subfolder. - Keep the generated
web.config. IIS uses it to configure the ASP.NET Core Module. - Grant the application pool identity read access to the app directory and write access to any folder the app uses, and to any other resource it reaches.
Microsoft’s sample intentionally does not configure HTTPS, and it warns against top-level wildcard bindings, so use explicit host names (Microsoft Learn, Publish ASP.NET Core to IIS).
Azure App Service
Azure App Service runs ASP.NET Core web apps on Windows or Linux. You can publish from Visual Studio or with a suitable command-line workflow, choosing the App Service target and deployment mode (Microsoft Learn, Deploy ASP.NET Core to Azure App Service).
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Best Value
For a ZIP deployment, create the archive from the contents of the dotnet publish output directory. Do not wrap that directory in an extra top-level folder. Before you deploy, confirm that the App Service runtime stack, operating system, and app target are compatible with the build you produced (Microsoft Learn, Deploy to App Service using ZIP).
Linux server with Kestrel and a reverse proxy
- Publish the app. Use framework-dependent output only if the server already has a compatible runtime; otherwise publish self-contained output for the server’s runtime identifier.
- Copy the publish output to the server. For a framework-dependent app, start it with
dotnetand the assembly name, for exampledotnet MyApp.dll. For a self-contained app, run the generated executable. - Configure a process manager to start the app at boot and restart it after a failure.
- Place a reverse proxy such as Nginx in front of Kestrel to receive public traffic and forward it to the app.
- Configure forwarded headers when the app needs the original scheme or client address, since the proxy sits between the client and Kestrel.
Follow Microsoft’s Nginx guide for your ASP.NET Core version and distribution (Microsoft Learn, Host ASP.NET Core on Linux with Nginx). The general hosting overview describes the same self-managed model (Microsoft Learn, Host and deploy ASP.NET Core).
AWS Elastic Beanstalk
AWS documents a .NET Core workflow that packages the dotnet publish output as a ZIP site archive and includes a deployment manifest in the source bundle. The cited guidance specifies a Windows Server platform. Treat that platform boundary as fixed for this example, and check the current AWS platform documentation before applying the workflow to any other platform (AWS Documentation, Elastic Beanstalk .NET deployment manifest).
Comparing the routes
The routes differ mainly in who supplies the runtime, which operating system is available, and who is responsible for the server and the process.
| Route | Runtime source | Operating system | Who runs the server and process | Artifact you transfer |
|---|---|---|---|---|
| IIS | .NET Hosting Bundle on the server (framework-dependent recommended) | Windows | You manage IIS, the site, and the application pool | Folder copy of the publish contents |
| Azure App Service | Runtime stack selected in the App Service configuration | Windows or Linux | Azure hosts the server; you choose the runtime stack and deployment mode | ZIP of the publish contents, or a Visual Studio publish |
| Linux with Kestrel | Installed on the server, or bundled with self-contained output | Linux | You manage the process manager, reverse proxy, HTTPS, and updates | Folder copy of the publish output |
| Elastic Beanstalk | Platform selected in the environment (Windows Server in the cited guidance) | Windows Server per the cited guidance | AWS manages the environment; you configure the application | ZIP site archive with a deployment manifest |
| Cost and performance | Not stated | Not stated | Not stated | Not stated; the cited Microsoft and AWS pages do not compare prices or benchmarks |
Choosing a route
- Choose IIS if you already run Windows servers and want the app in an existing IIS estate.
- Choose Azure App Service if you want the platform to run the web host and you accept a ZIP or Visual Studio publish workflow.
- Choose a Linux server if you want full control of the host and can run the process manager and reverse proxy yourself.
- Choose Elastic Beanstalk if your team already deploys through AWS and the platform in the cited guidance fits your application.
If you are unsure whether a host provides a compatible runtime, publish self-contained output for that host’s runtime identifier. It removes the runtime dependency at the cost of a larger, platform-specific artifact.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




