ASP.NET MVC5 Google APIs GoogleWebAuthorizationBroker.AuthorizeAsync AdSense 管理 API,在本地工作,但不在服务器中,
GoogleWebAuthorizationBroker.Folder = "Google.Apis.Auth";
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "XXXX",
ClientSecret = "XXXX"
},
new string[] { AdSenseService.Scope.Adsense },
"SampleApp",
CancellationToken.None).Result;
var service = new AdSenseService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
});
有什么建议么?我希望这是我错过的非常简单的事情,并且是一个配置问题..鉴于它在本地工作。