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
description: Learn how to use the Azure Queue Storage client library v12 for .NET to create a queue and add messages to the queue. Next, you learn how to read and delete messages from the queue. You'll also learn how to delete a queue.
description: Learn how to use the Azure Queue Storage client library for .NET to create a queue and add messages to the queue. Next, you learn how to read and delete messages from the queue. You'll also learn how to delete a queue.
4
4
author: normesta
5
5
ms.author: normesta
6
6
ms.date: 07/24/2020
@@ -11,11 +11,11 @@ ms.devlang: csharp
11
11
ms.custom: devx-track-csharp, mode-api
12
12
---
13
13
14
-
# Quickstart: Azure Queue Storage client library v12 for .NET
14
+
# Quickstart: Azure Queue Storage client library for .NET
15
15
16
16
Get started with the Azure Queue Storage client library version 12 for .NET. Azure Queue Storage is a service for storing large numbers of messages for later retrieval and processing. Follow these steps to install the package and try out example code for basic tasks.
17
17
18
-
Use the Azure Queue Storage client library v12 for .NET to:
18
+
Use the Azure Queue Storage client library for .NET to:
19
19
20
20
- Create a queue
21
21
- Add messages to a queue
@@ -40,22 +40,22 @@ Additional resources:
40
40
41
41
## Setting up
42
42
43
-
This section walks you through preparing a project to work with the Azure Queue Storage client library v12 for .NET.
43
+
This section walks you through preparing a project to work with the Azure Queue Storage client library for .NET.
44
44
45
45
### Create the project
46
46
47
-
Create a .NET Core application named `QueuesQuickstartV12`.
47
+
Create a .NET Core application named `QueuesQuickstart`.
48
48
49
-
1. In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app with the name `QueuesQuickstartV12`. This command creates a simple "hello world" C# project with a single source file named `Program.cs`.
49
+
1. In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app with the name `QueuesQuickstart`. This command creates a simple "hello world" C# project with a single source file named `Program.cs`.
50
50
51
51
```console
52
-
dotnet new console -n QueuesQuickstartV12
52
+
dotnet new console -n QueuesQuickstart
53
53
```
54
54
55
-
1. Switch to the newly created `QueuesQuickstartV12` directory.
55
+
1. Switch to the newly created `QueuesQuickstart` directory.
The following code retrieves the connection string for the storage account. The connection string is stored in the environment variable created in the [Configure your storage connection string](#configure-your-storage-connection-string) section.
184
184
185
-
Add this code inside the `Main` method:
185
+
Add this code to the end of the `Program.cs` file:
// Retrieve the connection string for use with the application. The storage
191
191
// connection string is stored in an environment variable called
@@ -221,6 +221,9 @@ QueueClient queueClient = new QueueClient(connectionString, queueName);
221
221
awaitqueueClient.CreateAsync();
222
222
```
223
223
224
+
> [!IMPORTANT]
225
+
> The account access key should be used with caution. If your account access key is lost or accidentally placed in an insecure location, your service may become vulnerable. Anyone who has the access key is able to authorize requests against the storage account, and effectively has access to all the data. `DefaultAzureCredential` provides enhanced security features and benefits and is the recommended approach for managing authorization to Azure services
226
+
224
227
---
225
228
226
229
### Add messages to a queue
@@ -341,7 +344,7 @@ dotnet run
341
344
The output of the app is similar to the following example:
0 commit comments