3
votes

I am working with Windows Azure and am just using the Blob Storage. I have setup my Blob Storage to run in its own Solution file with a dummy web role. I run it first on my development machine so the Azure Services start. I have configured the service to use the development shared key and account name.

I am running into an issue when I point my web application (in another solution) to the local Blob Storage service. I can upload a file to the Blob Storage and I can see the records in my local database. Therefore, I have entered the correct settings in the web.config. However, I cannot access the file via a simple Get request. I have verified that the container is public.

The URI I am using is:

http://127.0.0.1:10000/{container-name}/{filename}.{extension}

My code works when I use my production Azure Services, so is there something different about the Development Environment that I am missing? Does the local environment allow REST access?

UPDATE: I recently found this MSDN Article that describes the differences between production and development Storage URIs. I also documented my environment here on my blog.

2
What do you mean by "Does the local environment allow REST access?" For the blob, you should just be able to put the url in your browser and it should be served up (only uses a get with no auth) ... Are you trying to do something fancier than that? For a local storage sample I have the following image url returns the blob in my local storage (incident1=container name): 127.0.0.1:10000/devstoreaccount1/incident1/chrysanthemum.jpgJason Haley

2 Answers

9
votes

The uri looks to be slightly incorrect, the format for the development storage uri is:

http://<local-machine-address>:<port>/<account-name>/<resource-path>

Given that the account name is always devstoreaccount1 your uri should be:

http://127.0.0.1:10000/devstoreaccount1/{container-name}/{filename}.{extension}
0
votes

What kind of response or error code are you getting? If you are using IE- you can install Fiddler or use the built in developer tools in IE8 to help debug a communication problem. Sure- the development fabric works in REST!