azure Azure Media Service Account Creating an asset in media service account


Example

public static string CreateBLOBContainer(string containerName)
        {
            try
            {
                string result = string.Empty;
                CloudMediaContext mediaContext;
                mediaContext = new CloudMediaContext(mediaServicesAccountName, mediaServicesAccountKey);
                IAsset asset = mediaContext.Assets.Create(containerName, AssetCreationOptions.None);
                return asset.Uri.ToString();
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
        }