IIS上的Google日历api错误 [英] Google calendar api error on IIS
本文介绍了IIS上的Google日历api错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好先生,
我在webform中使用日历API。它的工作正常本地主机,但在iis上没有打开oauth身份验证弹出错误。
我尝试过:
UserCredential凭证;
string credPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, 凭据,name + \\calendar-dotnet-quickstart。 JSON跨度>);
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, client_secret.json跨度>);
使用( var stream =
new FileStream(path,FileMode.Open,FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets ,
范围,
user,
CancellationToken.None ,
new FileDataStore(credPath, true ))。结果;
}
解决方案
请帮助我还没有得到回复。
Hello Sir,
I am using calendar API in webform. Its working fine localhost but giving error on iis not open oauth authentication popup on iis.
What I have tried:
UserCredential credential;
string credPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "credentials", name + "\\calendar-dotnet-quickstart.json");
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "client_secret.json");
using (var stream =
new FileStream(path, FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
Scopes,
"user",
CancellationToken.None,
new FileDataStore(credPath, true)).Result;
}
解决方案
please help I didn't get response yet.
这篇关于IIS上的Google日历api错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文