Deploy Your ASP.NET Core Web API in Minutes with WSO2 Developer Platform
After building my first few ASP.NET Core Web APIs, I started looking for an easy way to deploy them. While there are many hosting platforms available, most of them require additional configuration, have limited free tiers, or aren’t the easiest to get started with.
While looking for a simple deployment platform, I came across WSO2 Developer Platform (formerly Choreo). It is an Internal Developer Platform (IDP) that handles building, deploying, and hosting your applications, allowing you to focus on writing code instead of managing infrastructure.
In this article, I’ll walk you through the complete process of creating an ASP.NET Core Web API, pushing it to GitHub, and deploying it to WSO2 Developer Platform. By the end of this guide, you’ll have your API running in the cloud in just a few simple steps.
Create the ASP.NET Core Web API
For this guide, I’ll assume you already have the .NET SDK installed on your machine and have a basic understanding of developing applications with ASP.NET Core.
To get started, open your terminal and create a new ASP.NET Core Web API project by running the following command:
dotnet new webapi -n DotNetChoreoDemoThis command creates a new ASP.NET Core Web API project named DotNetChoreoDemo.
Next, navigate into the project directory.
cd DotNetChoreoDemoBefore deploying the application, it’s always a good idea to verify that everything works correctly on your local machine.
Although the default project includes Swagger for testing your API, we’ll also add a simple endpoint that we’ll use later to verify the deployment.
Open Program.cs and add the following lines immediately after creating the builder:
var urls = builder.Configuration["ASPNETCORE_URLS"] ?? "http://0.0.0.0:8080";
builder.WebHost.UseUrls(urls);Next, add the following route before app.Run();.
app.MapGet("/health", () => Results.Ok("OK"));Now run the application.
dotnet runOnce the application starts, you’ll see the local URL in your terminal.
Open that URL in your browser and navigate to the /health endpoint you created earlier.
If everything is working correctly, you should see the response as “OK”
Push the project to GitHub
Create a public GitHub repository and push your ASP.NET Core project to it.
If you’re using the Free Tier of WSO2 Developer Platform, make sure the repository is public, as the free tier only supports deployments from public GitHub repositories.
Deploying the Application
Open WSO2 Developer Platform by visiting https://console.choreo.dev. If you don’t already have an account, create one and sign in.
After logging in, you’ll land on the Overview page. Click Create Project to create a new project. Once the project has been created, click Create Component.
Get Chamal Senarathna’s stories in your inbox
Join Medium for free to get updates from this writer.
Since we’re deploying an ASP.NET Core REST API, select the Service component type.
Next, connect the public GitHub repository you created earlier. After selecting the repository, provide a display name for the component and verify the branch and component directory if necessary.
Scroll down to the Build Preset section and select .NET. Choose .NET 8.x as the runtime version, then set the Port to 8080, which matches the port your application is configured to listen on.
Once everything is configured, click Create and Deploy.
The platform will immediately start building your application. Open the Build page from the left sidebar to monitor the progress. Depending on the size of your project, the build may take anywhere from a few seconds to a couple of minutes. Wait until the build status changes to Success.
After the build has completed, open the Deploy page from the left sidebar. You’ll see three deployment stages: Set up, Development, and Production.
From the Set up card, open the dropdown next to Deploy and select Configure & Deploy.
This opens the deployment configuration wizard on the right side.
In Step 1/3 -Environment Configurations, you can add environment variables and secrets such as database connection strings, API keys, or other application configuration.
For this application, click Add a Configuration and create an environment variable named ASPNETCORE_URLS with the value http://0.0.0.0:8080.
This tells ASP.NET Core to listen on port 8080, which is the same port configured for the Service component in WSO2 Developer Platform.
Once you’ve added the environment variable, click Next.
In Step 2/3 -File and Certificate Mount, no additional configuration is required for this application. Click Next to continue.
In Step 3/3 -Endpoint Details, make sure to disable the OAuth2 endpoint authentication by unchecking the enabled option, since this sample API doesn’t require authentication. After that, scroll to the bottom of the panel and click Deploy.
Within a few moments, the Development card should show the deployment status as Active. This indicates that your application has been successfully deployed.
To verify the deployment, click the Endpoints icon in the Development card. This will display the public endpoint URL for your service. Open the endpoint in your browser and append the /health path to the URL.
For example:
https://f2a60d61-0831-4ddf-bb84-4193bdc79cdb-dev.e1-us-east-azure.choreoapis.dev/dotnetchoreodemo/aspdotnet-service/v1.0/healthIf everything has been configured correctly, you should receive the OK response from the endpoint, confirming that your ASP.NET Core Web API is running successfully on Developer Platform.
That’s it! You’ve successfully deployed your first ASP.NET Core Web API to WSO2 Developer Platform. From now on, every time you push changes to your GitHub repository, WSO2 Developer Platform can automatically build (make sure to enable auto build from the build section) and deploy the latest version of your application, making it easy to iterate and share your projects.
I wouldn’t recommend using the free tier of WSO2 Developer Platform for a real production application. It’s a great choice for prototypes, demos, personal projects, or testing new ideas. If you’re building an application for real users, it’s better to use a paid plan that is designed to handle production workloads reliably.
Happy building, and let WSO2 Developer Platform handle the rest!






