You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you aren't signed in already, sign into your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
53
+
If you aren't signed in already, sign in to your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
53
54
54
55
1. In the **Configure Azure Application Insights** screen, select an existing Azure Application Insights component, and select **Next**.
55
56
@@ -97,9 +98,9 @@ The connected service functionality adds all the needed references and connectio
If you choose to use the Application Insights Sdk locally, click **Next** to see the **Summary of changes** screen, which shows how your project is being modified. A NuGet package reference is added to your project and the connection code for the local emulator is added to your project.
101
+
If you choose to use the Application Insights SDK locally, click **Next** to see the **Summary of changes** screen, which shows how your project is being modified. A NuGet package reference is added to your project and the connection code for the local emulator is added to your project.
101
102
102
-
If you want to connect to the Azure service, continue to the next step, or if you aren't signed in already, sign into your Azure account before continuing. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
103
+
If you want to connect to the Azure service, continue to the next step, or if you aren't signed in already, sign in to your Azure account before continuing. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
103
104
104
105
1. In the **Configure Azure Application Insights** screen, select an existing Azure Application Insights component, and select **Next**.
Copy file name to clipboardExpand all lines: docs/azure/azure-cache-for-redis-add-connected-service.md
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Add Azure Cache for Redis by using Connected Services
3
-
description: Learn how to add Azure cache for Redis support to your app with the Visual Studio process for adding a connected service.
3
+
description: Learn how to add Azure Cache for Redis support to your app with the Visual Studio process for adding a connected service.
4
4
author: AngelosP
5
5
manager: jmartens
6
6
ms.subservice: azure-development
@@ -9,12 +9,13 @@ ms.date: 05/15/2023
9
9
ms.author: angelpe
10
10
monikerRange: ">= vs-2019"
11
11
---
12
+
12
13
# Add Azure Cache for Redis by using Visual Studio Connected Services
13
14
14
15
With Visual Studio, you can connect any of the following to Azure Cache for Redis by using the **Connected Services** feature:
15
16
16
17
- .NET Framework console app
17
-
- ASP.NET MVC (.NET Framework)
18
+
- ASP.NET Model-View-Controller (MVC) (.NET Framework)
18
19
- ASP.NET Core
19
20
- .NET Core (including console app, WPF, Windows Forms, class library)
20
21
- .NET Core Worker Role
@@ -27,6 +28,7 @@ The connected service functionality adds all the needed references and connectio
27
28
28
29
> [!NOTE]
29
30
> This topic applies to Visual Studio on Windows. For Visual Studio for Mac, see [Connected services in Visual Studio for Mac](/visualstudio/mac/connected-services).
31
+
30
32
## Prerequisites
31
33
32
34
- Visual Studio with the Azure workload installed.
@@ -48,15 +50,15 @@ The connected service functionality adds all the needed references and connectio
48
50
49
51

50
52
51
-
If you aren't signed in already, sign into your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
53
+
If you aren't signed in already, sign in to your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
52
54
53
55
1. In the **Configure Azure Cache for Redis** screen, select an existing Azure Cache for Redis, and select **Next**.
54
56
55
57
If you need to create a new component, go to the next step. Otherwise, skip to step 7.
56
58
57
59

58
60
59
-
1. To create an Azure Redis Cache:
61
+
1. To create an Azure Cache for Redis:
60
62
61
63
1. Select **Create a new Azure Redis Cache** at the bottom of the screen.
62
64
@@ -92,29 +94,29 @@ The connected service functionality adds all the needed references and connectio
92
94
93
95
1. Choose **Azure Cache for Redis**. The **Connect to dependency** page appears. You should see two options, one for a local emulator, **Redis Cache on container (Local)**, and one for connecting to the live Azure Cache for Redis service. You can reduce cost and simplify early development by starting with the local emulator. You can migrate to the live service later by repeating these steps and choosing the other option.

96
98
97
-
If you choose the Redis cache locally, click **Next** to the **Connect to Redis cache on container** screen.
99
+
If you choose the Azure Cache for Redis locally, click **Next** to the **Connect to Redis cache on container** screen.
98
100
99
-

101
+

100
102
101
103
Specify **Container name**, **Container image**, and port mappings or accept the defaults, and click **Next** to see the **Summary of changes** screen, which shows what changes would be made to your project. A NuGet package reference is added to your project and the connection code for the local emulator is added to your project.
102
104
103
-
If you want to connect to the Azure service, continue to the next step, or if you aren't signed in already, sign into your Azure account before continuing. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
105
+
If you want to connect to the Azure service, continue to the next step, or if you aren't signed in already, sign in to your Azure account before continuing. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
104
106
105
107
1. To go with the live service, select **Azure Cache for Redis**.
106
108
107
109

108
110
109
-
If you aren't signed in already, sign into your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
111
+
If you aren't signed in already, sign in to your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
110
112
111
113
1. In the **Configure Azure Cache for Redis** screen, select an existing Azure Cache for Redis, and select **Next**.
112
114
113
115
If you need to create a new component, go to the next step. Otherwise, skip to step 7.
114
116
115
117

116
118
117
-
1. To create an Azure Redis Cache:
119
+
1. To create an Azure Cache for Redis:
118
120
119
121
1. Select **Create a new Azure Redis Cache** at the bottom of the screen.
120
122
@@ -142,7 +144,7 @@ The connected service functionality adds all the needed references and connectio
142
144
143
145
## Next steps
144
146
145
-
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.
147
+
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.
146
148
147
149
To cache session state in an ASP.NET app, see [ASP.NET Session State Provider](/azure/azure-cache-for-redis/cache-aspnet-session-state-provider).
Copy file name to clipboardExpand all lines: docs/azure/azure-cosmosdb-add-connected-service.md
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,13 @@ ms.date: 02/15/2024
9
9
ms.author: ghogen
10
10
monikerRange: ">= vs-2019"
11
11
---
12
+
12
13
# Add Azure Cosmos DB to your app by using Visual Studio Connected Services
13
14
14
15
With Visual Studio, you can connect any of the following to Azure Cosmos DB by using the **Connected Services** feature:
15
16
16
17
- .NET Framework console app
17
-
- ASP.NET MVC (.NET Framework)
18
+
- ASP.NET Model-View-Controller (MVC) (.NET Framework)
18
19
- ASP.NET Core
19
20
- .NET Core (including console app, WPF, Windows Forms, class library)
20
21
- .NET Core Worker Role
@@ -27,13 +28,15 @@ The connected service functionality adds all the needed references and connectio
27
28
28
29
> [!NOTE]
29
30
> This topic applies to Visual Studio on Windows. For Visual Studio for Mac, see [Connected services in Visual Studio for Mac](/visualstudio/mac/connected-services).
31
+
30
32
## Prerequisites
31
33
32
34
- Visual Studio with the Azure workload installed.
If you aren't signed in already, sign into your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
53
+
If you aren't signed in already, sign in to your Azure account. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
51
54
52
55
1. In the **Azure Cosmos DB** screen, select an existing Azure Cosmos DB, and select **Next**.
53
56
@@ -95,7 +98,7 @@ The connected service functionality adds all the needed references and connectio
95
98
96
99
If you choose to use the Azure Cosmos DB Emulator, click **Next** to see the **Summary of changes** screen, which shows how your project is being modified. A NuGet package reference is added to your project and the connection code for the local emulator is added to your project. Once you click **Finish** on the last screen, the container for the emulator is created; you'll see the image download status in the output window.
97
100
98
-
If you want to connect to the Azure service, continue to the next step, or if you aren't signed in already, sign into your Azure account before continuing. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
101
+
If you want to connect to the Azure service, continue to the next step, or if you aren't signed in already, sign in to your Azure account before continuing. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/).
99
102
100
103
1. In the **Azure Cosmos DB** screen, select an existing Azure Cosmos DB, and select **Next**.
101
104
@@ -129,7 +132,7 @@ The connected service functionality adds all the needed references and connectio
129
132
130
133
If you click on the three dots next to the dependency you added, you can see various options such as **Connect** to reopen the wizard and change the connection. You can also click the three dots at the top right of the window to see options to start local dependencies, change settings, and more.
131
134
132
-
1. By default, the memory limit in the container is set to 2G, but normally, more memory is required to run CosmosDB. To fix this, navigate to the `.vs/sd/<GUID>/local` folder under your solution folder. In Windows Explorer, you might have to enable hidden files to see the `.vs` folder. Find and open the file *cosmosdb1.docker-compose.yml*. Set a 4G or higher memory limit.
135
+
1. By default, the memory limit in the container is set to 2G, but normally, more memory is required to run Azure Cosmos DB. To fix this, navigate to the `.vs/sd/<GUID>/local` folder under your solution folder. In Windows Explorer, you might have to enable hidden files to see the `.vs` folder. Find and open the file *cosmosdb1.docker-compose.yml*. Set a 4G or higher memory limit.
133
136
134
137
```yml
135
138
mem_limit = 4G
@@ -140,7 +143,7 @@ The connected service functionality adds all the needed references and connectio
140
143
:::moniker-end
141
144
142
145
> [!NOTE]
143
-
> The local emulator for CosmosDB might reference a base image that uses a temporary license for Azure CosmosDB. If the container doesn't start, check the **Logs** tab in the **Containers*** window for the Cosmos DB container. If it mentions a PAL expiration issue, you need to get the latest base image for the local container. Run the following command from the console prompt: `docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest`. The license is periodically updated, and when it expires, refreshing to the newest container should solve the issue. You can view and report issues for the Azure CosmosDB emulator at the [Azure CosmosDB emulator GitHub repo](https://github.com/Azure/azure-cosmos-db-emulator-docker/issues).
146
+
> The local emulator for Azure Cosmos DB might reference a base image that uses a temporary license for Azure Cosmos DB. If the container doesn't start, check the **Logs** tab in the **Containers*** window for the Azure Cosmos DB container. If it mentions a PAL expiration issue, you need to get the latest base image for the local container. Run the following command from the console prompt: `docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest`. The license is periodically updated, and when it expires, refreshing to the newest container should solve the issue. You can view and report issues for the Azure Cosmos DB emulator at the [Azure Cosmos DB emulator GitHub repo](https://github.com/Azure/azure-cosmos-db-emulator-docker/issues).
144
147
145
148
## Next steps
146
149
@@ -153,7 +156,7 @@ using CosmosClient client = new(
153
156
);
154
157
```
155
158
156
-
The `CosmosClient` provides access to Cosmos DB functionality through its various methods. Once you have an instance of `CosmosClient`, you can create a NoSQL database by following this guide: [Create a database in Azure Cosmos DB for NoSQL using .NET](/azure/cosmos-db/nosql/how-to-dotnet-create-database).
159
+
The `CosmosClient` provides access to Azure Cosmos DB functionality through its various methods. Once you have an instance of `CosmosClient`, you can create a NoSQL database by following this guide: [Create a database in Azure Cosmos DB for NoSQL using .NET](/azure/cosmos-db/nosql/how-to-dotnet-create-database).
0 commit comments