- Integrations
Start .NET middleware from scratch
This guide provides step-by-step instructions for creating a hosted middleware API using:
- Microsoft Azure for cloud hosting
- .NET Core 3.1 for development
- Dotnet Catalyst package for OrderCloud features
The complete example is available in dotnet-catalyst-examples.
Middleware requirements
Common use cases
OrderCloud applications often need middleware for:
- Secure third-party integrations
- Payment processor connections
- Scheduled data synchronization
- Product import automation
- Custom email notifications
- Event-driven workflows
Account setup
Required accounts
Development tools
Local machine requirements:
- .NET Framework
- .NET Core 3.1 runtime
- Visual Studio 2019
Code setup
Repository setup
- Clone example repository:
- Transfer to your version control
Azure configuration
App Configuration setup
Store application settings in Azure App Configuration:
- Create App Configuration resource
- Add settings in Configuration Explorer:
- Match field names in AppSettings.cs
- Use colons for nesting (e.g.,
OrderCloudSettings:ClientSecret)
- Copy connection string from Access Keys
Environment configuration
Create separate App Configuration resources for:
- Development
- Testing
- Staging
- Production
Local development
Visual Studio setup
- Open project in Visual Studio 2019
- Create debug profile:
- Right-click WebApi project
- Properties > Debug > New
- Add Environment Variables
- Key:
APP_CONFIG_CONNECTION

Local testing
- Select Catalyst.Api project
- Choose debug profile
- Launch application
- Verify endpoints:
- Browse to
https://localhost:5001 - Test
GET https://localhost:5001/api/env - Confirm settings display
- Browse to
Azure deployment
App Service setup
- Create Azure App Service
- Configure settings:
- Add
APP_CONFIG_CONNECTION - Set in Configuration tab
- Match local configuration
- Add
Deployment options
Visual Studio deployment
Quick start option:
- Deploy from Visual Studio
- Suitable for initial testing
- Not recommended for production
Azure DevOps deployment
Recommended approach:
- Use provided azure-pipelines.yml
- Update App Service name (line 8)
- Push changes to deployment branch
- Create build pipeline:
- Select repository
- Configure deployment

Verification
After deployment:
- Access App Service URL
- Verify API documentation
- Test endpoints
- Confirm settings
Related reading
- Pre-built checkout integrations in .NET
- Using extended properties in custom eCommerce apps
- Configuring user and application data access
If you have suggestions for improving this article, let us know!