October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Deploy a .NET Application Without a Dockerfile or Docker Build Process

You can deploy an ASP.NET Core app without Docker by running dotnet publish and moving the output to IIS, Azure App Service, or a Linux server. Here is how to choose the output type and the route.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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).

Deployment routes

IIS on Windows

  1. 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.
  2. In IIS Manager, create a site and set its physical path to the directory where the app will live.
  3. Publish in Release mode, then copy the contents of the publish folder into that site directory. Do not copy the publish folder itself as a subfolder.
  4. Keep the generated web.config. IIS uses it to configure the ASP.NET Core Module.
  5. 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).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Game Programming Patterns
  • Brand New in box. The product ships with all relevant accessories

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

  1. 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.
  2. Copy the publish output to the server. For a framework-dependent app, start it with dotnet and the assembly name, for example dotnet MyApp.dll. For a self-contained app, run the generated executable.
  3. Configure a process manager to start the app at boot and restart it after a failure.
  4. Place a reverse proxy such as Nginx in front of Kestrel to receive public traffic and forward it to the app.
  5. 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).

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.