1

I am trying to export an Azure package using the GetPackage method of Service Management API.

I have tried both calling the REST API directly using a WebClient, and by using the Windows Azure Service Management Library package (I have posted the code I used as an answer to that question).

However, no matter the method I tried and how I constructed and/or encoded the container URI, I am always getting the following error:

400 Bad Request Parameter value '...' specified for parameter 'ContainerUriString' is invalid.

The parameter in question is of the following form: https://something.blob.core.windows.net/somecontainer

I verified that the storage account exists and is accessible (tried both public and private containers), even tried calling HttpUtility.UrlEncode() on the container URI (even though the SDK does it automatically).

Any ideas how to get this resolved?

Community
  • 1
  • 1
David Airapetyan
  • 5,301
  • 4
  • 40
  • 62
  • One thing you may want to check if the storage account belongs to the same subscription or not. – Gaurav Mantri Jul 04 '15 at 04:29
  • @GauravMantri: why would you worry about such trivial detail? That was, by the way, totally it, thank you so much! I've been banging my head against that wall for an hour now, and the solution is trivial! Yes, storage must (obviously) belong to the same subscription! – David Airapetyan Jul 04 '15 at 04:36
  • Awesome!!! I wish the documentation should mention that or the error message says this explicitly. Let me put this as answer. – Gaurav Mantri Jul 04 '15 at 04:39

1 Answers1

1

Please ensure that the storage account where you want the files to be copied belong to the same subscription as that of Cloud Service.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • Sounds very trivial, but very easy to make this mistake, especially because I was using the package export to copy the deployment from one subscription to another, which led me to this error. – David Airapetyan Jul 04 '15 at 04:43