【发布时间】:2018-12-30 04:32:23
【问题描述】:
当我在本地使用该应用程序时(在使用 Visual Studio 执行时)没有问题,但是当我部署我的项目时,身份验证不起作用。 问题就在这里:
string path = HostingEnvironment.MapPath("~/App_Data");
FileDataStore file = new FileDataStore(path);
credential =new GoogleWebAuthorizationBroker().AuthorizeAsync(
new ClientSecrets
{
ClientId = "Client_ID",
ClientSecret = "Client_Secret"
},
Scopes,
"me",
CancellationToken.None
, file
).Result;
【问题讨论】:
-
你能分享一下错误信息或错误代码是什么吗?
-
错误在这里:private bool OpenBrowser(string url) { Process.Start(url);返回真; } 它告诉我访问被拒绝
-
我在将所有错误日志放入来自 Google.Apis.Auth 项目的文本文件后发现了错误