Azure Blob Storage Emulator Error [duplicate] - c#

For some reason my DevStorage account has stopped working. I get a 400 Bad Request error on every request to DevStorage (both Blob and Table). I can browse DevStorage with Azure Storage Explorer, though.
This is really strange, because I'm not aware of changing anything to the environment.
I have re-installed Azure SDK 2.1 (July 2013). Even after a clean install, it does not work. When I deploy the cloud service to Windows Azure, it works fine. Running it in the emulator doesn't.
I actually use the same code as the samples to connect, but I'll post it anyway.
// Storage account
var storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Blob client
var blobClient = storageAccount.CreateCloudBlobClient();
// Container
var cloudContainer = blobClient.GetContainerReference(container);
cloudContainer.CreateIfNotExists();
Value of StorageConnectionString is UseDevelopmentStorage=true.
Container is lowercase, letters only (e.g. 'pictures').
I run Visual Studio 2012 as administrator.
Any help would be much appreciated!

Did you by any chance install the latest version of Storage Client library (3.0.0.0) which was released yesterday? That could be one reason why your code stopped working because the latest version of library doesn't work with storage emulator (Scroll down to the bottom of this post: http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx). If you look at the detailed error message, you will see One of the request headers is invalid.
UPDATE: 03-Feb-2014
Please download Storage Emulator 2.2.1 Preview which has support for latest storage client library. More information about this release can be found here: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/01/27/windows-azure-storage-emulator-2-2-1-preview-release-with-support-for-2013-08-15-version.aspx.
UPDATE: 15-Apr-2014
If you're using SDK Version 2.3, then there's no need for installing Storage Emulator 2.2.1. Storage Emulator in version 2.3 fully supports Storage client library 3.x.

I had the same problem with Azure Storage Emulator 3.0.0 which came from Azure SDK 2.3 on VS 2013 update 2.
To solve the problem I started the Web Platform Installer and searched for Storage Emulator then ran the Azure SDK 2.3 (VS2013) and it installed Storage Emulator 3.2.0.0 which fixes the problem.

Related

The C# code running on Mac OS by Visual Studio 2019 for Mac is unable to write and read to/from the local Azure Storage Account Emulator

I used the following two connection strings in appsettings.json file to read and write from/to Azure Storage Emulator installed on my Mac machine:
"ConnectionString":"UseDevelopmentStorage=true"
And
"ConnectionString":"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;
AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;
BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;
QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;"
As a background, I installed Visual Studio 2019 for Mac on a fresh Mac machine. I guess Visual Studio 2019 for Mac must already have been shipped with the emulator. The Mac's operating system is macOS Catalina Version 10.15.6.
The problem that I am facing is that I am totally unable to have blobs written to, or read from the emulator and I keep getting connection refused error message. This issue keeps happening despite Microsoft Azure Storage Explorer installed on the Mac machine communicates with the emulator successfully, displays all blobs, writes and reads to/from the storage.
What is missing in my connection string configuration or what else I'm supposed to do on my Mac machine to have the C# code read and write from/to the storage emulator.
The Azure Storage Emulator only works on Windows and is being deprecated. Other platforms use Azurite, but the integration for it with Visual Studio is incomplete, so you have to run it manually:
https://github.com/Azure/Azure-Functions/issues/1343#issuecomment-678536378
This was all found with 5 minutes of consulting MSDN and using Google.

Azure App Services isn't available

I've been trying to use Azure as Mobile App service and in the tutorial it is given to choose this :
Whilst when i try to follow it shows this :
Can anyone help ? Thank you :)
The Azure Visual Studio tooling, however, should be upgraded to version 2.8.1 or later...
https://azure.microsoft.com/en-us/downloads/
https://azure.microsoft.com/en-us/documentation/articles/app-service-api-whats-changed/
As Thiago suggested, you will have to install the latest Azure SDK to get the option.
If not, then you can select the Import option. This will require you to provide the publishsettings file.
You can download the publishsettings file from the Azure Portal. Here is a sample image: http://i.stack.imgur.com/YV2OQ.jpg
Once you have imported it, the IDE will pick the deployment endpoints from the file and you will be able to publish the App.
NOTE: Mobile Apps have the same deployment as the Web Apps. The IDE doesn't have the tooling to pick Mobile APPS from the subscription. Until then you will have to use the Import option in the VS deployment wizard.

Could not get the Microsoft Azure storage account settings

I'm trrying to publish an ASP.NET MVC project to azure.
In other computer i do this without problems, but in mine I don't.
The following error appears when publishing in Visual Studio 2013 :
Could not get the Microsoft Azure storage account settings for
'account-name' needed to configure an application module.
Please check your network connection and verify that the account exists.
Is your project using Azure SDK 2.6 but you also have Azure SDK 2.7 installed? I had the same error and upgrading my cloud project to Azure SDK 2.7 seemed to fix it.

Could not load file or assembly Microsoft.ServiceHosting.Tools

I just got a new workstation set up and I installed VS 2013 with Windows Azure SDK 2.3 first. But then I realized that our project was built upon Windows Azure SDK 2.2. So I uninstalled the SDK 2.3 and then installed 2.2. After that, I got the project from TFS and tried to run it and there was a problem:
Cannot debug the project because some run time file was missing.
So I tried to repair it by uninstalling Windows Azure SDK 2.2 completely and repair my VisualStudio.
But now I get this error message:
Could not load file or assembly 'Microsoft.ServiceHosting.Tools, Version=1.0.0.0, Culture =neutral, PublicKeyToken=232wedsfd3f4' or one of its dependencies. The system cannot find the file specified.
I looked through the project and there wasn't any reference of Miscrosoft.ServiceHosting. And the database and cloud are working. No idea what happened in the machine since Azure is a new field for me. Does anybody ever meet the same problem?
In my case, I have VS 2012. I was trying to develop an Azure web service. The error I'm encountering was
'Could not load file or assembly ***'Microsoft.ServiceHosting.Tools'***'
The issue was resolved after installing Microsoft Azure Emulator and
Microsoft Azure Storage Emulator.
I found the cause to be a corrupt Azure SDK installation on my machine with VS.NET 2013.
Reinstalling the Azure SDK from here (http://azure.microsoft.com/en-us/downloads/) and restarting VS.NET to clean and build the solution worked for me and got rid of the build error from the OP.
I finally solve the problem! But I won't delete the post because I think some other people might meet the same problem.
My problem was caused by OS (Win8.1 Ultimate) which doesn't support Hyper-V so that Azure Emulator couldn't be installed. After installing Windows Pro or Enterprise the problem will be solved!
Hopefully can help somebody who run into the same problem as me.
Reinstalling MicrosoftAzureComputeEmulator-x64 and MicrosoftAzureStorageEmulator solved the issue. No need to install the full Azure SDK again.
I faced same issue and reinstallation of above 2 softwares and restart of visual studio fixed the issue.

Azure 400 Bad Request on every request

For some reason my DevStorage account has stopped working. I get a 400 Bad Request error on every request to DevStorage (both Blob and Table). I can browse DevStorage with Azure Storage Explorer, though.
This is really strange, because I'm not aware of changing anything to the environment.
I have re-installed Azure SDK 2.1 (July 2013). Even after a clean install, it does not work. When I deploy the cloud service to Windows Azure, it works fine. Running it in the emulator doesn't.
I actually use the same code as the samples to connect, but I'll post it anyway.
// Storage account
var storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Blob client
var blobClient = storageAccount.CreateCloudBlobClient();
// Container
var cloudContainer = blobClient.GetContainerReference(container);
cloudContainer.CreateIfNotExists();
Value of StorageConnectionString is UseDevelopmentStorage=true.
Container is lowercase, letters only (e.g. 'pictures').
I run Visual Studio 2012 as administrator.
Any help would be much appreciated!
Did you by any chance install the latest version of Storage Client library (3.0.0.0) which was released yesterday? That could be one reason why your code stopped working because the latest version of library doesn't work with storage emulator (Scroll down to the bottom of this post: http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx). If you look at the detailed error message, you will see One of the request headers is invalid.
UPDATE: 03-Feb-2014
Please download Storage Emulator 2.2.1 Preview which has support for latest storage client library. More information about this release can be found here: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/01/27/windows-azure-storage-emulator-2-2-1-preview-release-with-support-for-2013-08-15-version.aspx.
UPDATE: 15-Apr-2014
If you're using SDK Version 2.3, then there's no need for installing Storage Emulator 2.2.1. Storage Emulator in version 2.3 fully supports Storage client library 3.x.
I had the same problem with Azure Storage Emulator 3.0.0 which came from Azure SDK 2.3 on VS 2013 update 2.
To solve the problem I started the Web Platform Installer and searched for Storage Emulator then ran the Azure SDK 2.3 (VS2013) and it installed Storage Emulator 3.2.0.0 which fixes the problem.

Categories