Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

Azure Media Servicdes: client.Assets.CreatOrUpdateAsync results in error: The resource Type is invalid

Based on the docs here: https://docs.microsoft.com/en-us/azure/media-services/latest/stream-files-tutorial-with-api

I've created a media services client and am attempting to create the new asset that will have the video file uploaded into it.

When I do this using the infromation provided on the API Access tab of the media service in question, the line: client.Assets.CreateOrUpdateAsync fails with "The resource type is invalid."

Anyone have any idea as to what is causing that and how to fix it? The sample is woefully out of date with credential management and the author is completely non-responsive for over a year.

question from:https://stackoverflow.com/questions/65834280/azure-media-servicdes-client-assets-creatorupdateasync-results-in-error-the-re

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

So I found what this error actually means for anyone that hits this with the same problem:

It's the asset name. It has to conform to Windows file naming standards otherwise you'll get this unhelpful error.

Of course the error message should be updated to "invalid asset name, please ensure that it conforms to windows file naming conventions" but that's a separate bug report to Microsoft.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...