Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load type 'Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters #201

Open
Eilon opened this issue Apr 5, 2018 · 2 comments

Comments

@Eilon
Copy link
Member

Eilon commented Apr 5, 2018

From @CarlosOnline on April 5, 2018 13:22

Could not load type Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters for .net core 2.0.3.

Is there any way to resolve this issue?

Error:
Could not load type 'Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters' from assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.19.2.6005, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Source=Microsoft.WindowsAzure.MediaServices.Client.Common.Authentication

Code:

CloudMediaContext AzureContext; // See Azure Media Services for initialize instructions
AzureContext.Assets.ToList(); // Exception here

Exception

System.TypeLoadException
  HResult=0x80131522
  Message=Could not load type 'Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters' from assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.19.2.6005, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
  Source=Microsoft.WindowsAzure.MediaServices.Client.Common.Authentication
  StackTrace:
   at Microsoft.WindowsAzure.MediaServices.Client.AzureAdTokenProvider.GetToken()
   at Microsoft.WindowsAzure.MediaServices.Client.AzureAdTokenProvider.GetAuthorizationHeader()
   at Microsoft.WindowsAzure.MediaServices.Client.OAuth.OAuthDataServiceAdapter.AddAccessTokenToRequest(WebRequest request)
   at Microsoft.WindowsAzure.MediaServices.Client.AzureMediaServicesClassFactory.<>c__DisplayClass22_0.<GetAccountApiEndpoint>b__0()
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.WindowsAzure.MediaServices.Client.TransientFaultHandling.MediaRetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction(Action action)
   at Microsoft.WindowsAzure.MediaServices.Client.AzureMediaServicesClassFactory.GetAccountApiEndpoint(OAuthDataServiceAdapter dataServiceAdapter, ServiceVersionAdapter versionAdapter, Uri apiServer, UserAgentAdapter userAgentAdapter, IWebRequestAdapter clientRequestIdAdapter)
   at Microsoft.WindowsAzure.MediaServices.Client.AzureMediaServicesClassFactory.<>c__DisplayClass25_0.<CreateAzureMediaServicesEndPoint>b__0()
   at Microsoft.WindowsAzure.MediaServices.Client.Cache`1.GetOrAdd(String key, Func`1 valueFactory, Func`1 expirationFactory)
   at Microsoft.WindowsAzure.MediaServices.Client.AzureMediaServicesClassFactory..ctor(Uri azureMediaServicesEndpoint, CloudMediaContext mediaContext)
   at Microsoft.WindowsAzure.MediaServices.Client.CloudMediaContext.get_MediaServicesClassFactory()
   at Microsoft.WindowsAzure.MediaServices.Client.AssetCollection.<.ctor>b__2_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.WindowsAzure.MediaServices.Client.BaseCollection`1.get_Provider()
   at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
   at SUR.AzureStreaming.Assets.GetAssets(String prefix, Boolean withLocatorsOnly) in E:\sur\Streaming2\Providers\AzureStreaming\AzureAsset.cs:line 64

Copied from original issue: aspnet/Configuration#807

@Eilon
Copy link
Member Author

Eilon commented Apr 5, 2018

From @flytzen on April 5, 2018 13:34

There is a similar problem in Azure Functions (I don't have the ref to hand). Maybe related?

@andreatosato
Copy link

No news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants