Intro
Requirements
Quickstart
Further Reading
This single page web app shows you how to set up the FME .NET SDK and evaluate an FME feature flag. This is a ASP.NET Core MVC app built with Razor Pages.
To run the example, you need:
- VS Code with the C# Dev Kit extension
- .NET 8.0 or .NET 9.0 (
dotnet --version)
To run the FME .NET SDK in the web app:
- Log in to Harness or create a free account.
- Navigate to Feature Management & Experimentation > FME Settings > Projects > View > SDK API Keys and copy a server-side SDK API key for one of your FME environments.
- Paste your SDK API key as the value of the
sdkKeyvariable inFmeInitializer.cs. - Create a feature flag, initiate the FME environment, define the flag's targeting rules, and assign the flag name to the
featureFlagNamevariable inIndex.cshtml.cs. - Run the application, flip to your browser and you should see the treatment for the feature flag on the main page.
You can also set a value for featureFlagName and userKey, using url parameters as follows:
http://localhost:7113?featureFlagName=your_feature_flag_name&userKey=user001
See the FME .NET SDK reference to learn about configuration options, optimizations, and event tracking.
For more information about feature flags, see our Feature Management documentation.
Harness is a software delivery platform that delivers intelligent AI automation, so your team ships code faster, safer, and smarter.
