gpt4 book ai didi

asp.net - Google Analytics V3 ASP.Net API beta 1.5 OAuth2错误

转载 作者:行者123 更新时间:2023-12-03 17:03:50 24 4
gpt4 key购买 nike

我正在使用带有服务帐户的最新beta 1.5(1.5.0.28991)Google API,并且在进行身份验证时在AssertionFlowClient行中遇到此错误:


找不到方法:“无效DotNetOpenAuth.OAuth2.ClientBase..ctor(DotNetOpenAuth.OAuth2.AuthorizationServerDescription,System.String,System.String)。


DotNetOpenAuth V4.3.1.13153

AuthorizationServerDescription desc = GoogleAuthenticationServer.Description;
X509Certificate2 key = new X509Certificate2(key_file, key_pass, X509KeyStorageFlags.Exportable);
AssertionFlowClient client = new AssertionFlowClient(desc, key) { ServiceAccountId = client_id, Scope = scope };


我为此感到震惊-任何指针将不胜感激。

最佳答案

从...下载示例

https://code.google.com/p/google-api-dotnet-client/source/browse/Plus.ServiceAccount/Program.cs?repo=samples

(下载链接的证书无效,因此您不能使用Chrome来下载它,而必须使用IE)

窃取“ Plus.ServiceAccount”项目中的packages.config和app.config文件,并将其放置在您的项目中。

重新加载您的项目,然后在要求下载软件包的“软件包管理器控制台”上进行加载。

那使错误对我来说消失了。我一定是在使用错误版本的...某物。

关于asp.net - Google Analytics V3 ASP.Net API beta 1.5 OAuth2错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18701390/

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