Table of Contents
Note

This guide applies to Steeltoe v3. Please open an issue if you'd like to help update the content for Steeltoe v4.

Application Configuration Random Values

This tutorial takes you through setting up a .NET Core application that gets a random value for a config setting.

Note

For more detailed examples, please refer to the RandomValue project in the Steeltoe Samples Repository.

First, create a .NET Core WebAPI that has a placeholder implemented.

  1. Create a new ASP.NET Core WebAPI app with the Steeltoe Initializr
  2. Name the project "RandomValueExample"
  3. Add the "Random value" dependency
  4. Click Generate Project to download a zip containing the new project
  5. Extract the zipped project and open in your IDE of choice (we use Visual Studio)

Run the application

dotnet run <PATH_TO>\RandomValueExample.csproj

Navigate to the endpoint (you may need to change the port number) http://localhost:5000/api/values

Once the app loads in the browser you will see three random values output.

["<INTEGER>","<UUID>","<STRING>"]