Live is streaming live. Watch now.

.NET Cookbook

Useful tips for getting started with .NET

Here are some useful tips for getting started with .NET on Pivotal Cloud Foundry. Search with words like “steeltoe”, “dotnet”, “kerberos”, or “buildpack” to find helpful .NET things.

Another area of interest is the Steeltoe Incubator. This is a collection of Steeltoe related projects, made by the community.

  • Getting Started
  • Steps to follow to push a ASP.NET application to PCF

  • Kubernetes
  • Examples of deploying a .NET application to a Kubernetes cluster with windows workers

  • Troubleshooting
  • Steps to follow when your ASP.NET application doesn't work

  • Logging
  • For many applications, logging is written to a rolling log file or the Windows Event Log. In a cloud application, this becomes an anti-pattern because you need to either depend on a distributed logging system, or a platform feature. To move away from these dependencies, the 12 factor application methodology recommends outputting logs as a stream to stdout/stderr. When migrating a legacy application, we often recommend configuring any existing logging framework to output to stdout/stderr.

  • Third Party
  • Each recipe in this section documents a set of steps that were taken to work with 3rd party dependencies or services. SQL Server SQL Server DB Migration to Azure Azure Service Broker IBM DB2 SMB Shares IBM MQ MSVCRT & Unmanaged C++ ODBC Drivers Oracle DB Driver

  • Unsupported
  • Other technologies… Biztalk Classic ASP Sharepoint

  • Workers
  • Headless worker processes… Console Applications Job Scheduler Windows NT Services Windows Workflow (WF)

  • Windows
  • Each article in this section documents a procedure for creating, maintaining, debugging, or architecting your PAS for Windows cell infrastructure. Remote Windows Cell Access Troubleshooting Windows Cells Server Message Block (SMB) File Shares AD Domain Setup and Integration .NET Versions Find Installed .NET Version

  • CF SDK
  • The Cloud Foundry .NET SDK enables you to access the CloudController API programmatically. The Cloud Foundry API lets you manage applications and automate functions typically available via Apps Manager and the CF CLI. The full CF API Documentation is available at Github repo Procfile for Custom Startup Application Details Authentication List All Applications Update Application

  • APM
  • Application Performance Management (APM) is the monitoring and management of performance and availability of software applications. APM strives to detect and diagnose complex application performance problems to maintain an expected level of service. The majority of APM tools you are accustomed to for Java are available for .NET Framework and .NET Core applications on both Windows and Linux. App Dynamics New Relic

  • .NET Core
  • Each recipe in this section documents a set of steps that were taken to solve a problem with .NET Core. Some recipes are specific to greenfield .NET Core projects while other contain information on migrating a .NET Framework application to .NET Core. Migrating to .NET Core Remote Debug Bootstrapping with CF Task Scoped Logging w/ Serilog Steeltoe Dynamic Logger Redis for On-Prem applications Testing in Isolated App Domains .NET Core Targeting Full Framework .

  • Each recipe in this section documents a set of steps that were taken to solve a problem with ASP.NET. ODBC ASP.NET Web API OIDC/OAuth 2.0 Route service in .NET Graceful Shutdown TLS - Client Cert Infinite HTTPS redirects Persist session to Redis Core like Startup Steeltoe & Unity in Full Framework Local Debugging (hwc.exe) Remote Debugging Custom Log Provider

  • Configuration
  • Each recipe in this section documents a set of steps that were taken to solve a problem with .NET configuration. Machine Key Config Server Health Contributor Config Refresh With Git Webhook Config Server and Docker Config Server with Vault & Git Steeltoe and Config Server on Legacy Framework VCAP Configuration Web Config Static Config to DI Options Externalizing ASP.NET Config

  • WCF
  • WCF services can typically run in Cloud Foundry with minimal changes. WCF is a large framework so the guidance here is for the most common type of configurations. The most common of these being SOAP or REST based services using a http(s) transport hosted either in IIS or self hosted. Common Issues WCF services which are already hosted in IIS can usually be pushed to Cloud Foundry with very few changes, if any.

Cloud Foundry Community

Along with the many recipes in this cookbook, there are also full projects available in the Cloud Foundry Community repo to help you to migrate apps to PCF more easily.

.NET Core CLI Extension - For creating new extension buildpacks

Buildpack Staging Simulator - For debugging app droplets locally

Windows Services Final Buildpack - For bootstrapping Windows Services without converting to a console app (used instead of the HWC buildpack)

Web Config Transform Extension Buildpack - For automating cloud-friendly configuration changes

Using IWA Kerberos with WCF - This group of tools includes a Route Service, Route Service Extension Buildpacks for Ingress and Egress scenarios, and a supporting Nuget package.