Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k 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.


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

1 Answer

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 field 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...