Access Azure on-premises storage with a simple REST 'GET'

I work with Windows Azure and just use Blob storage. I installed my Blob repository to run in my own dummy web role solution file. First, I run it on my development machine in order to run Azure Services. I configured the service to use the shared development key and account name.

I am having a problem when I point my web application (in another solution) to the local Blob storage service. I can upload the file to the Blob repository, and I can see the entries in my local database. Therefore, I entered the correct settings in web.config. However, I cannot access the file with a simple Get request. I checked that the container is open.

I am using a URI:

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

My code works when I use my Azure Services for production, so is there something else in the development environment that I am missing? Is the local environment available for 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.

+3
source share
2 answers

Uri looks a bit incorrect, the format for storing uri for storage:

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}
+9
source

? IE, Fiddler IE8, . , REST .

0

Source: https://habr.com/ru/post/1725178/


All Articles