English 中文(简体)
Accessing local Azure blob storage via a simple REST GET
原标题:

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.

最佳回答

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}
问题回答

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!





相关问题
building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

热门标签