Skip to content

Commit 60aac46

Browse files
Merge pull request #226674 from pauljewellmsft/pauljewell-azurite-update
Update for clarity around running Azurite in VS
2 parents 845593f + 5a35c1b commit 60aac46

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

articles/storage/common/storage-use-azurite.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ ms.custom: devx-track-csharp
1515

1616
The Azurite open-source emulator provides a free local environment for testing your Azure Blob, Queue Storage, and Table Storage applications. When you're satisfied with how your application is working locally, switch to using an Azure Storage account in the cloud. The emulator provides cross-platform support on Windows, Linux, and macOS.
1717

18-
Azurite is the future storage emulator platform. Azurite supersedes the [Azure Storage Emulator](storage-use-emulator.md). Azurite will continue to be updated to support the latest versions of Azure Storage APIs.
18+
Azurite supersedes the [Azure Storage Emulator](storage-use-emulator.md), and continues to be updated to support the latest versions of Azure Storage APIs.
1919

2020
There are several different ways to install and run Azurite on your local system. Select any of these tabs.
2121

2222
## Install Azurite
2323

2424
### [Visual Studio](#tab/visual-studio)
2525

26-
Azurite is automatically available with [Visual Studio 2022](https://visualstudio.microsoft.com/vs/). If you're running an earlier version of Visual Studio, you'll need to install Azurite by using either Node Package Manager, DockerHub, or by cloning the Azurite GitHub repository.
26+
Azurite is automatically available with [Visual Studio 2022](https://visualstudio.microsoft.com/vs/). If you're running an earlier version of Visual Studio, you can install Azurite by using either Node Package Manager, DockerHub, or by cloning the Azurite GitHub repository.
2727

2828
### [Visual Studio Code](#tab/visual-studio-code)
2929

@@ -96,23 +96,31 @@ npm install -g
9696

9797
### [Visual Studio](#tab/visual-studio)
9898

99-
With a few configurations, Azure Functions or ASP.NET projects start Azurite automatically. For all other project types, you'll have to start Azurite from the command line.
99+
To use Azurite with most project types in Visual Studio, you first need to run the Azurite executable. Once the executable is running, Azurite listens for connection requests from the application. To learn more, see [Running Azurite from the command line](#running-azurite-from-the-command-line).
100100

101-
#### Running Azurite from the command line
101+
For **Azure Functions** projects and **ASP.NET** projects, you can choose to configure the project to start Azurite automatically. This configuration is done during the project setup. While this project configuration starts Azurite automatically, Visual Studio doesn't expose detailed Azurite configuration options. To customize detailed Azurite configuration options, [run the Azurite executable](#running-azurite-from-the-command-line) before launching Visual Studio.
102+
103+
To learn more about configuring **Azure Functions** projects and **ASP.NET** projects to start Azurite automatically, see the following guidance:
102104

103-
You can find the Azurite executable file in the extensions folder of your Visual Studio installation. The specific location can vary based on which version of Visual Studio is installed. For example, if you've installed Visual Studio 2022 professional edition on a Windows computer or Virtual Machine (VM), you would find the Azurite executable file at this location:
105+
- [Running Azurite from an Azure Functions project](#running-azurite-from-an-azure-functions-project)
106+
- [Running Azurite from an ASP.NET project](#running-azurite-from-an-aspnet-project)
104107

105-
`C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator`.
108+
#### Running Azurite from the command line
106109

107-
If you use the enterprise version of the Visual Studio, please open the following location:
110+
You can find the Azurite executable file in the extensions folder of your Visual Studio installation. The specific location varies based on which version of Visual Studio is installed. The following table shows the location of the Azurite executable for different versions of Visual Studio running on a Windows machine:
108111

109-
`C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator`.
112+
| Visual Studio version | Azurite executable location |
113+
| --- | --- |
114+
| Visual Studio Professional 2022 | `C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator` |
115+
| Visual Studio Enterprise 2022 | `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator` |
110116

111-
Open the required location and start the `azurite.exe`. After you run the executable file, Azurite listens for connections.
117+
Navigate to the appropriate location and start `azurite.exe`. After you run the executable file, Azurite listens for connections.
112118

113119
> [!div class="mx-imgBorder"]
114120
> ![Azurite command-line output](media/storage-use-azurite/azurite-command-line-output-vs.png)
115121
122+
To learn more about available command line options to configure Azurite, see [Command line options](#command-line-options).
123+
116124
#### Running Azurite from an Azure Functions project
117125

118126
In Visual Studio 2022, create an **Azure Functions** project. While setting the project options, mark the box labeled **Use Azurite for runtime storage account**.
@@ -133,7 +141,7 @@ In the **Configure Storage Azurite emulator** dialog box, set the **Connection s
133141

134142
:::image type="content" source="./media/storage-use-azurite/azurite-aspnet-connection-string.png" alt-text="A screenshot showing how to configure a connection string to use Azurite with an ASP.NET project." lightbox="media/storage-use-azurite/azurite-aspnet-connection-string.png":::
135143

136-
When the configuration completes, select **Close** and the Azurite emulator starts automatically. The output looks similar to the following screenshot:
144+
When the configuration completes, select **Close**, and the Azurite emulator starts automatically. The output looks similar to the following screenshot:
137145

138146
:::image type="content" source="./media/storage-use-azurite/azurite-aspnet-output.png" alt-text="A screenshot showing output after connecting an ASP.NET project to the Azurite emulator." lightbox="media/storage-use-azurite/azurite-aspnet-output.png":::
139147

@@ -165,7 +173,7 @@ Launch Azurite by issuing the following command:
165173
azurite --silent --location c:\azurite --debug c:\azurite\debug.log
166174
```
167175

168-
This command tells Azurite to store all data in a particular directory, *c:\azurite*. If the `--location` option is omitted, it will use the current working directory.
176+
This command tells Azurite to store all data in a particular directory, *c:\azurite*. If the `--location` option is omitted, it uses the current working directory.
169177

170178
### [Docker Hub](#tab/docker-hub)
171179

@@ -204,7 +212,7 @@ To get started immediately with the command line, create a directory called *c:\
204212
azurite --silent --location c:\azurite --debug c:\azurite\debug.log
205213
```
206214

207-
This command tells Azurite to store all data in a particular directory, *c:\azurite*. If the `--location` option is omitted, it will use the current working directory.
215+
This command tells Azurite to store all data in a particular directory, *c:\azurite*. If the `--location` option is omitted, it uses the current working directory.
208216

209217
---
210218

@@ -223,7 +231,7 @@ azurite --help
223231

224232
### Blob listening host
225233

226-
**Optional** - By default, Azurite will listen to 127.0.0.1 as the local server. Use the `--blobHost` switch to set the address to your requirements.
234+
**Optional** - By default, Azurite listens to 127.0.0.1 as the local server. Use the `--blobHost` switch to set the address to your requirements.
227235

228236
Accept requests on the local machine only:
229237

@@ -242,7 +250,7 @@ azurite --blobHost 0.0.0.0
242250
243251
### Blob listening port configuration
244252

245-
**Optional** - By default, Azurite will listen for the Blob service on port 10000. Use the `--blobPort` switch to specify the listening port that you require.
253+
**Optional** - By default, Azurite listens for the Blob service on port 10000. Use the `--blobPort` switch to specify the listening port that you require.
246254

247255
> [!NOTE]
248256
> After using a customized port, you need to update the connection string or corresponding configuration in your Azure Storage tools or SDKs.
@@ -263,7 +271,7 @@ The port in use is displayed during Azurite startup.
263271

264272
### Queue listening host
265273

266-
**Optional** - By default, Azurite will listen to 127.0.0.1 as the local server. Use the `--queueHost` switch to set the address to your requirements.
274+
**Optional** - By default, Azurite listens to 127.0.0.1 as the local server. Use the `--queueHost` switch to set the address to your requirements.
267275

268276
Accept requests on the local machine only:
269277

@@ -282,7 +290,7 @@ azurite --queueHost 0.0.0.0
282290
283291
### Queue listening port configuration
284292

285-
**Optional** - By default, Azurite will listen for the Queue service on port 10001. Use the `--queuePort` switch to specify the listening port that you require.
293+
**Optional** - By default, Azurite listens for the Queue service on port 10001. Use the `--queuePort` switch to specify the listening port that you require.
286294

287295
> [!NOTE]
288296
> After using a customized port, you need to update the connection string or corresponding configuration in your Azure Storage tools or SDKs.
@@ -303,7 +311,7 @@ The port in use is displayed during Azurite startup.
303311

304312
### Table listening host
305313

306-
**Optional** - By default, Azurite will listen to 127.0.0.1 as the local server. Use the `--tableHost` switch to set the address to your requirements.
314+
**Optional** - By default, Azurite listens to 127.0.0.1 as the local server. Use the `--tableHost` switch to set the address to your requirements.
307315

308316
Accept requests on the local machine only:
309317

@@ -322,7 +330,7 @@ azurite --tableHost 0.0.0.0
322330
323331
### Table listening port configuration
324332

325-
**Optional** - By default, Azurite will listen for the Table service on port 10002. Use the `--tablePort` switch to specify the listening port that you require.
333+
**Optional** - By default, Azurite listens for the Table service on port 10002. Use the `--tablePort` switch to specify the listening port that you require.
326334

327335
> [!NOTE]
328336
> After using a customized port, you need to update the connection string or corresponding configuration in your Azure Storage tools or SDKs.
@@ -343,7 +351,7 @@ The port in use is displayed during Azurite startup.
343351

344352
### Workspace path
345353

346-
**Optional** - Azurite stores data to the local disk during execution. Use the `-l` or `--location` switch to specify a path as the workspace location. By default, the current process working directory will be used. Note the lowercase 'l'.
354+
**Optional** - Azurite stores data to the local disk during execution. Use the `-l` or `--location` switch to specify a path as the workspace location. By default, the current process working directory is used. Note the lowercase 'l'.
347355

348356
```console
349357
azurite -l c:\azurite
@@ -417,7 +425,7 @@ azurite --oauth basic --cert path/server.pem --key path/key.pem
417425
> [!NOTE]
418426
> OAuth requires an HTTPS endpoint. Make sure HTTPS is enabled by providing `--cert` switch along with the `--oauth` switch.
419427
420-
Azurite supports basic authentication by specifying the `basic` parameter to the `--oauth` switch. Azurite will do basic authentication, like validating the incoming bearer token, checking the issuer, audience, and expiry. Azurite won't check the token signature or permissions.
428+
Azurite supports basic authentication by specifying the `basic` parameter to the `--oauth` switch. Azurite performs basic authentication, like validating the incoming bearer token, checking the issuer, audience, and expiry. Azurite doesn't check the token signature or permissions.
421429

422430
### Skip API Version Check
423431

@@ -429,7 +437,7 @@ azurite --skipApiVersionCheck
429437

430438
### Disable Production Style Url
431439

432-
**Optional**. When using the fully qualified domain name instead of the IP in request Uri host, by default Azurite will parse the storage account name from request Uri host. You can force the parsing of the storage account name from request Uri path by using `--disableProductStyleUrl`:
440+
**Optional**. When using the fully qualified domain name instead of the IP in request Uri host, by default Azurite parses the storage account name from request Uri host. You can force the parsing of the storage account name from request Uri path by using `--disableProductStyleUrl`:
433441

434442
```cmd
435443
azurite --disableProductStyleUrl
@@ -630,14 +638,14 @@ In Storage Explorer, connect to Azurite by following these steps:
630638

631639
#### Connect to Azurite using HTTPS
632640

633-
By default Storage Explorer won't open an HTTPS endpoint that uses a self-signed certificate. If you're running Azurite with HTTPS, you're likely using a self-signed certificate. In Storage Explorer, import SSL certificates via the **Edit** -> **SSL Certificates** -> **Import Certificates** dialog.
641+
By default, Storage Explorer doesn't open an HTTPS endpoint that uses a self-signed certificate. If you're running Azurite with HTTPS, you're likely using a self-signed certificate. In Storage Explorer, import SSL certificates via the **Edit** -> **SSL Certificates** -> **Import Certificates** dialog.
634642

635643
##### Import Certificate to Storage Explorer
636644

637645
1. Find the certificate on your local machine.
638646
1. In Storage Explorer, go to **Edit** -> **SSL Certificates** -> **Import Certificates** and import your certificate.
639647

640-
If you don't import a certificate, you'll get an error:
648+
If you don't import a certificate, you get an error:
641649

642650
`unable to verify the first certificate` or `self signed certificate in chain`
643651

@@ -718,7 +726,7 @@ set AZURITE_ACCOUNTS="account1:key1:key2"
718726

719727
You could add more accounts. See the [Custom storage accounts and keys](#custom-storage-accounts-and-keys) section of this article.
720728

721-
Start Azurite and use a customized connection string to access your account. The example connection string below assumes that the default ports are used.
729+
Start Azurite and use a customized connection string to access your account. In the following example, the connection string assumes that the default ports are used.
722730

723731
```
724732
DefaultEndpointsProtocol=http;AccountName=account1;AccountKey=key1;BlobEndpoint=http://account1.blob.localhost:10000;QueueEndpoint=http://account1.queue.localhost:10001;TableEndpoint=http://account1.table.localhost:10002;
@@ -728,7 +736,7 @@ Don't access default account in this way with Azure Storage Explorer. There's a
728736

729737
By default, when using Azurite with a production-style URL, the account name should be the host name in fully qualified domain name such as "http://devstoreaccount1.blob.localhost:10000/container". To use production-style URL with account name in the URL path such as "http://foo.bar.com:10000/devstoreaccount1/container", make sure to use the `--disableProductStyleUrl` parameter when you start Azurite.
730738

731-
If use `host.docker.internal` as request Uri host (For example: `http://host.docker.internal:10000/devstoreaccount1/container`), Azurite will always get the account name from the request Uri path. This is true regardless of whether you use the `--disableProductStyleUrl` parameter when you start Azurite.
739+
If you use `host.docker.internal` as request Uri host (For example: `http://host.docker.internal:10000/devstoreaccount1/container`), Azurite gets the account name from the request Uri path. This behavior is true regardless of whether you use the `--disableProductStyleUrl` parameter when you start Azurite.
732740

733741
### Scaling and performance
734742

0 commit comments

Comments
 (0)