简体   繁体   中英

Azure Storage Emulator not connecting to development storage

I did a fresh install of the azure storage emulator. Used the command tool AzureStorageEmulator.exe to initialize everything.

I then start the Azure Storage Explorer and see all my subscriptions. When I open the 'Local and Attached' to create a new Blob container, Queue or Table under 'Development' the program starts loading that node indefinitely.

When I tried to run my project from Visual Studio 2017, the emulator is started but is stopped immediately. With the error: Microsoft.WindowsAzure.Storage.StorageException: 'The underlying connection was closed: The connection was closed unexpectedly'.

When I check the status of the Storage Emulator it is running. The sqlexpress db has created AzureStorageEmulatorDb52. Yet the Storage Explorer doesn't seem to connect to the local storage to load or create any new entities.

Things I tried: Reïnstalled Visual Studio, the Azure SDK, the AzureStorageExplorer, the AzureStorageEmulator, deleting the AzureStorageEmulator database on the local sqlexpress instance ...

What am I missing?

'The underlying connection was closed: The connection was closed unexpectedly'.

Is mostly caused due to network connectivity issues between the emulator and the SQLDB.

You should run either of the following commands:

AzureStorageEmulator.exe init /server <SQLServerInstance>

Or

You can also use the following command, which directs the emulator to use the default SQL Server instance:

AzureStorageEmulator.exe init /server .\\

I'd recommend checking this quick tutorial here

To start the Azure storage emulator:

Select the Start button or press the Windows key.
Type or paste Azure Storage Emulator.
Select the emulator from the list of displayed applications.

Initialize the storage emulator to use a different SQL database:

Enter the following at the Azure Storage Emulator command prompt window:
AzureStorageEmulator.exe init /server .

View Azure database from SSMS:

The following database should be created:
AzureStorageEmulatorDb54

try the below command

AzureStorageEmulator init /server . -skipcreate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM