Reputation: 221
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
Upvotes: 19
Views: 59263
Reputation: 157
The issue was caused by mixing uppercase and lowercase letters in the container name. Docker container names are case-sensitive, so inconsistencies in letter casing can lead to errors. I resolved the problem by converting all letters in the container name to lowercase.
If you're facing a similar issue, check your container names and make sure they're consistent. Using lowercase names is a good practice to avoid this kind of problem in the future.
Upvotes: 1
Reputation: 91
I think it has to do with the container name. For example, as people pointed out before, characters like "_" are not accepted.
One thing you may try to do is to lower case your string and replace characters like "_" by "-". That will probably be enough.
Upvotes: 0
Reputation: 12370
Permitted characters are lowercase a-z 0-9 and single, infix, hyphens
[a-z0-9\-]
Upvotes: 38
Reputation: 11
I had the same problem and it was caused by an incorrect container name
Upvotes: 0
Reputation: 1
verify container name or coonection string might contain extra/nonallowed symbols... In my case it was having extra spaces in container name
Upvotes: 3
Reputation: 146
This will probably not solve your problem, but it will solve a related problem for other people:
If the aim is to simply download a file from Azure File Storage using a link, after generating a SAS token, as shown here: Azure File Storage URL in browser showing InvalidHeaderValue
If you remove the slash after the name of the file in the generated link, the file will download!
Upvotes: 0
Reputation: 141
I solved this problem by removing apostrophes around container name:
az storage blob upload-batch --account-name something --account-key something --destination $web --source ./
Upvotes: 14