0
votes

I'm following the documentation provided by Microsoft to create a new blob container in Azure Storage Emulator. However, I was getting a strange error as seen below after enter in cmdlets commands in PowerShell. The azure storage emulator was running and so that was definitely not the issue. What's the work around for this strange error when trying to enter in cmdlets command provided by microsoft?

PS C:\Windows\system32> $context = New-AzStorageContext -Local
>>
>> $containerName = "video2"
>> New-AzStorageContainer -Name $containerName -Context $context -Permission blob
>>
>> $now = Get-Date
>>
>> New-AzStorageContainerSASToken -Name $containerName -Permission rwdl -ExpiryTime $now.AddDays(1.0) 
-Context $context -FullUri

 Get-AzStorageBlob : An error occurred while sending the request.
 At line:5 char:1
 + Get-AzStorageBlob -Container $ContainerName -Context $ctx | select Na ...
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo          : CloseError: (:) [Get-AzStorageBlob], StorageException
 + FullyQualifiedErrorId : 
 StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlob
 Command
1

1 Answers

0
votes

The solution for this issue was to clear the data, stop azure, and then initialize Azure Storage Emulator. Those mentioned actions were conducted in Microsoft Azure Storage Emulator v5.10 application. Plus, when you initialize Azure Storage Emulator, you will see the database name that was created and the server name instance the database is associated with. That's useful if you want to connect to the generated database in Microsoft SQL Server Management Studio or Visual Studio.