Bertzor
Bertzor

Reputation: 163

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?

Upvotes: 0

Views: 2344

Answers (3)

maxspan
maxspan

Reputation: 14147

try the below command

AzureStorageEmulator init /server . -skipcreate

Upvotes: 0

kevin
kevin

Reputation: 1

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

Upvotes: 0

'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

Upvotes: 0

Related Questions