Reputation: 2815
I am using WindowAzure
cloud computing API. I am developing a very basic application just saving
and accessing
the Blob
because i started learning it today. I installed SDK for VWD express 2010. I used the following connection string to connect to the storage emulator running locally :
.
.
<add key="StorageConnectionString" value="UseDevelopmentStorage=true" />
</appSettings>
My code for saving the Blob, where i got exception (Unable to connect to the remote server
), line marked :
public void Save()
{
CloudBlobClient blobclient = Account.CreateCloudBlobClient();
CloudBlobContainer container = blobclient.GetContainerReference(Container);
=====> container.CreateIfNotExist();
container.SetPermissions(new BlobContainerPermissions() { PublicAccess = BlobContainerPublicAccessType.Blob });
CloudBlob blob = container.GetBlobReference(Blob);
blob.UploadFromStream(Data);
}
Why it is connecting to the remote server, it should be run locally ?
Upvotes: 1
Views: 325
Reputation: 529
"Remote server" is a generic response meaning it can't connect to the server you specified in your connection string (the development server). Apparently the storage emulator is not running. Start it, and your code should work.
Upvotes: 4