Share via


Add Azure Cache for Redis by using Visual Studio Connected Services

With Visual Studio, you can connect any of the following to Azure Cache for Redis by using the Connected Services feature:

  • .NET Framework console app
  • ASP.NET Model-View-Controller (MVC) (.NET Framework)
  • ASP.NET Core
  • .NET Core (including console app, WPF, Windows Forms, class library)
  • .NET Core Worker Role
  • Azure Functions
  • Universal Windows Platform App
  • Cordova

The connected service functionality adds all the needed references and connection code to your project, and modifies your configuration files appropriately.

Prerequisites

Connect to Azure Cache for Redis using Connected Services

Next steps

For ASP.NET apps, common use cases for Azure Cache for Redis are to cache session state or page output (HTTP responses). ASP.NET Core provides built-in services for these use cases, which should be used instead when you're using ASP.NET Core.

To cache session state in an ASP.NET app, see ASP.NET Session State Provider.

To cache page output in an ASP.NET app, see ASP.NET Output Cache Provider.