BIENVENUE10valid for the first month only! on all offersView plans
Skip to content
← Knowledge base

Deploy a C# .NET application on onesubnet

Deploy ASP.NET / .NET services: dotnet build, run the DLL, port and environment variables.

Deploy a C# .NET application on onesubnet

onesubnet runs your .NET applications (ASP.NET Core, services, API). Deploy via Git.

1. Prepare the project

  • A .csproj / .sln at the root.
  • ASP.NET Core reads ASPNETCORE_URLS or PORT. Bind the port in Program.cs:
var port = Environment.GetEnvironmentVariable("PORT") ?? "8080";
builder.WebHost.UseUrls($"http://*:{port}");

2. Deploy

  1. Connect your Git repository in the panel.
  2. Build command: dotnet publish -c Release -o out
  3. Start command: dotnet out/MyApp.dll

3. Environment variables

Connection strings, secrets… in Settings → Environment. ASP.NET reads them via IConfiguration / Environment.GetEnvironmentVariable.

4. Logs

Live console in the panel. Use ILogger (Serilog supported).

References

Related products

oneSubnet

French hosting provider in Paris. High-performance game and voice servers.

SERVICES

Resources

LEGAL

All systems operational