Can't instantiate a new AzureMediaServicesClient RRS feed

  • Question

  • I am currently trying to setup a demo project to work with Azure Media Services v3 but am running into an issue when trying to instantiate a new AzureMediaServicesClient.

    I'm following the example that is provided in the Azure Docs for Media Services 3.

    When I do a test run, it gets to the CreateMediaServicesClientAsync method and then errors out when trying to create a new client. Below is the exact line that is failing:

    return new AzureMediaServicesClient(config.ArmEndpoint, credentials)
        SubscriptionId = config.SubscriptionId

    When I debug and put a breakpoint, I can see that config.ArmEndpoint is a URI that seems to be populated correctly. Credentials also seems to look as expected so I'm not sure what is causing the following error when trying to debug.


    Attempted to access an element as a type incompatible with the array

    Stack Trace:

    at System.Collections.Generic.List`1.Add(T item)

    at Microsoft.Azure.Management.Media.AzureMediaServicesClient.Initialize()

    at Microsoft.Azure.Management.Media.AzureMediaServicesClient..ctor(Uri baseUri, ServiceClientCredentials credentials, DelegatingHandler[] handlers)

    Monday, December 9, 2019 4:46 PM

All replies