2
votes

ERROR: The specifed resource name contains invalid characters. ErrorCode: InvalidResourceName

2019-10-31T10:28:17.4678189Z <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidResourceName</Code><Message>The specifed resource name contains invalid characters.

2019-10-31T10:28:17.4678695Z RequestId:

2019-10-31T10:28:17.4679207Z Time:2019-10-31T10:28:17.4598301Z</Message></Error>

I am trying to deploy my static website to blob storage in azure with azure DevOps, but I am getting this error. In my pipeline, I am using grunt build to build, and archive it to zip, then publishing to the azure pipeline, then in the release, I am extracting files, and trying to upload these files with azure CLI task.

I am using following command az storage blob upload-batch --account-name something --account-key something --destination ‘$web’ --source ./

My Container name is $web

2
provide more informartion and describe your errorJuNe
probably your blob\container name contain capital letters or dashes or something similar, you are only allowed to use [a-z0-9] in your storage\container\blob names4c74356b41
I have enabled static web site in an azure storage account, afterward, $web container automatically created in containers. I am only providing '$web' destination in CLI command, I have checked it, I didn't use _ or capitals charactersMahesh Kumar
I am getting the same error to read Azure File Storage or File Containers from Logic APP. Please let me know if anyone has a solution to that.Riddhi Sanyal

2 Answers

10
votes

I solved this problem by removing apostrophes around container name: az storage blob upload-batch --account-name something --account-key something --destination $web --source ./