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
Copy file name to clipboardExpand all lines: articles/storage/common/storage-use-azurite.md
+13-18Lines changed: 13 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ There are several different ways to install and run Azurite on your local system
23
23
24
24
### [Visual Studio](#tab/visual-studio)
25
25
26
-
Azurite is automatically available with [Visual Studio 2022](https://visualstudio.microsoft.com/vs/). If you are 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'll need to install Azurite by using either Node Package Manager, DockerHub, or by cloning the Azurite GitHub repository.
27
27
28
28
### [Visual Studio Code](#tab/visual-studio-code)
29
29
@@ -100,7 +100,7 @@ With a few configurations, Azure Functions or ASP.NET projects start Azurite aut
100
100
101
101
#### Running Azurite from the command line
102
102
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 you have 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:
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:
@@ -115,32 +115,27 @@ Open the required location and start the `azurite.exe`. After you run the execut
115
115
116
116
#### Running Azurite from an Azure Functions project
117
117
118
-
In Visual Studio 2022, create an **Azure Functions** project. As you create the project, choose the **Storage Emulator**.
118
+
In Visual Studio 2022, create an **Azure Functions** project. While setting the project options, mark the box labeled **Use Azurite for runtime storage account**.
119
119
120
-
> [!div class="mx-imgBorder"]
121
-
> 
120
+
:::image type="content" source="./media/storage-use-azurite/azurite-azure-functions.png" alt-text="A screenshot showing how to set Azurite to be the runtime storage account for an Azure Functions project." lightbox="media/storage-use-azurite/azurite-azure-functions.png":::
122
121
123
-
After you create the project, Azurite starts automatically.
122
+
After you create the project, Azurite starts automatically. The output looks similar to the following screenshot:
124
123
125
-
> [!div class="mx-imgBorder"]
126
-
> 
124
+
:::image type="content" source="./media/storage-use-azurite/azurite-azure-functions-output.png" alt-text="A screenshot showing output after setting Azurite to be the runtime storage account for an Azure Functions project." lightbox="media/storage-use-azurite/azurite-azure-functions-output.png":::
127
125
128
126
#### Running Azurite from an ASP.NET project
129
127
130
128
In Visual Studio 2022, create an **ASP.NET Core Web App** project. Then, open the **Connected Services** dialog box, select **Add a service dependency**, and then select **Storage Azurite emulator**.
131
129
132
-
> [!div class="mx-imgBorder"]
133
-
> 
130
+
:::image type="content" source="./media/storage-use-azurite/azurite-aspnet-connect.png" alt-text="A screenshot showing how to add Azurite as a dependency to an ASP.NET project." lightbox="media/storage-use-azurite/azurite-aspnet-connect.png":::
134
131
135
132
In the **Configure Storage Azurite emulator** dialog box, set the **Connection string name** field to `StorageConnectionString`, and then select **Finish**.
:::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":::
139
135
140
-
When the configuration completes, select **Close**. The Azurite emulator starts automatically.
136
+
When the configuration completes, select **Close** and the Azurite emulator starts automatically. The output looks similar to the following screenshot:
141
137
142
-
> [!div class="mx-imgBorder"]
143
-
> 
138
+
:::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":::
144
139
145
140
### [Visual Studio Code](#tab/visual-studio-code)
146
141
@@ -434,7 +429,7 @@ azurite --skipApiVersionCheck
434
429
435
430
### Disable Production Style Url
436
431
437
-
**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`:
432
+
**Optional**. When using the fullyqualified 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`:
438
433
439
434
```cmd
440
435
azurite --disableProductStyleUrl
@@ -729,9 +724,9 @@ Start Azurite and use a customized connection string to access your account. The
Do not access default account in this way with Azure Storage Explorer. There is a bug that Storage Explorer is always adding account name in URL path, causing failures.
727
+
Don't access default account in this way with Azure Storage Explorer. There's a bug that Storage Explorer is always adding account name in URL path, causing failures.
733
728
734
-
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.
729
+
By default, when using Azurite with a production-style URL, the account name should be the host name in fullyqualified 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.
735
730
736
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.
0 commit comments