gpt4 book ai didi

azure-mobile-services - 找不到 JwtSecurityTokenHandler.set_CertificateValidator 方法

转载 作者:行者123 更新时间:2023-12-04 10:04:01 25 4
gpt4 key购买 nike

刚刚更新了 Azure 移动服务的许多包,现在出现“找不到方法”错误。这似乎不是其他地方报告的问题。知道哪个包需要降级吗?还是另一种解决方法?

[MissingMethodException: Method not found: 'Void System.IdentityModel.Tokens.JwtSecurityTokenHandler.set_CertificateValidator(System.IdentityModel.Selectors.X509CertificateValidator)'.]
Microsoft.WindowsAzure.Mobile.Service.Security.Providers.GoogleLoginProvider..ctor(HttpConfiguration config, IServiceTokenHandler tokenHandler) +0
lambda_method(Closure , Object[] ) +174
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +419

[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(System.Web.Http.HttpConfiguration, Microsoft.WindowsAzure.Mobile.Service.Security.IServiceTokenHandler)' on type 'GoogleLoginProvider'. ---> Method not found: 'Void System.IdentityModel.Tokens.JwtSecurityTokenHandler.set_CertificateValidator(System.IdentityModel.Selectors.X509CertificateValidator)'. (See inner exception for details.)]
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +999
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +589
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +109
Autofac.Core.Resolving.InstanceLookup.<Execute>b__0() +63
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +201
Autofac.Core.Resolving.InstanceLookup.Execute() +262
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +282
Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +72
Autofac.Features.Collections.<>c__DisplayClass6.<RegistrationsFor>b__1(IComponentRegistration cr) +60
System.Linq.WhereSelectArrayIterator`2.MoveNext() +66
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +335
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +77
Autofac.Features.Collections.<>c__DisplayClass4.<RegistrationsFor>b__0(IComponentContext c, IEnumerable`1 p) +256
Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +191
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +109
Autofac.Core.Resolving.InstanceLookup.Execute() +158
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +282
Autofac.Core.Resolving.ResolveOperation.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +60
Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +111
Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +279
Autofac.Core.Container.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +57
Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +175
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +250
Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters) +72
Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) +63
Microsoft.WindowsAzure.Mobile.Service.Config.AutofacDependencyScope.GetServices(Type serviceType) +269
System.Web.Http.DependencyScopeExtensions.GetServices(IDependencyScope services) +172
System.Web.Http.DependencyScopeExtensions.GetLoginProviders(IDependencyScope services) +41
Microsoft.WindowsAzure.Mobile.Service.Config.OwinAppBuilder.ConfigureAuthentication(IAppBuilder appBuilder, HttpConfiguration config) +379
Microsoft.WindowsAzure.Mobile.Service.Config.OwinAppBuilder.Configuration(IAppBuilder appBuilder) +70
Microsoft.WindowsAzure.Mobile.Service.<>c__DisplayClass5.<ConfigureOwin>b__4(IAppBuilder appBuilder) +40
Microsoft.WindowsAzure.Mobile.Service.Config.StartupOwinAppBuilder.Configuration(IAppBuilder appBuilder) +234

最佳答案

我刚刚遇到了同样的问题,并且已经让移动服务再次工作

在 VS 的包管理器控制台中

卸载包 WindowsAzure.MobileServices.Backend.Entity

卸载包 WindowsAzure.MobileServices.Backend.Tables

卸载包 WindowsAzure.MobileServices.Backend

然后

安装包 WindowsAzure.MobileServices.Backend -Version 1.0.342

安装包 WindowsAzure.MobileServices.Backend.Tables -Version 1.0.342

安装包 WindowsAzure.MobileServices.Backend.Entity -Version 1.0.342

不知道为什么会发生这种情况

关于azure-mobile-services - 找不到 JwtSecurityTokenHandler.set_CertificateValidator 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26596519/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com