var oAuth = await GoogleWebAuthorizationBroker
.AuthorizeAsync(GoogleCloudSettings.ClientSecrets,
GoogleCloudSettings.AuthScopes, "User", CancellationToken.None,
new FileDataStore(this.GetType().ToString()));
//GET REFRESH TOKEN
await oAuth.RefreshTokenAsync(CancellationToken.None);
var userCredential = GoogleCredential.FromAccessToken(oAuth.Token.AccessToken);
var storage = StorageClient.Create(userCredential);
当前在Windows服务上运行,上面的代码在调试模式下运行良好,但是在Windows桌面上发布并安装了该服务后,该代码似乎未运行,但是在检查已安装的服务处于运行状态时。请帮忙。
我认为这是因为我使用的授权需要用户交互。我一直在通过Internet寻找解决方案/替代方案,但是随着我的实现,事情变得越来越不可能。