我正在开发 DOT 5.0 版本。(核心 MVC 应用程序)。
在 Azure 中上传我的文件时(编码期间)遇到错误。
Asset outputAsset = await CreateOutputAssetAsync(client, config.ResourceGroup, config.AccountName,
outputAssetName, uploadedAsset.Description);
private static async Task<Asset> CreateOutputAssetAsync(IAzureMediaServicesClient client,
string resourceGroupName, string accountName, string assetName, string assetDescription)
{
// Check if an Asset already exists
Asset outputAsset = await client.Assets.GetAsync(resourceGroupName, accountName, assetName);
string outputAssetName = assetName;
Asset asset = new Asset()
{
Description = "Encoded-" + assetDescription,
StorageAccountName = "MyStoarestorage"
};
return await client.Assets.CreateOrUpdateAsync(resourceGroupName, accountName, outputAssetName, asset);
}
等待 client.Assets.GetAsync的行失败。我错过了任何包裹吗?按照下面的 URL 并安装它。(https://docs.microsoft.com/en-us/azure/media-services/latest/configure-connect-dotnet-howto)。
请建议。 注意:- 相同的代码在我的桌面应用程序中运行良好,并上传带有 AZURE 编码的视频。但是何时应用相同的代码 .NET 5.0 CORE MVC 应用程序一些它是如何不工作的