【发布时间】:2012-11-29 15:18:02
【问题描述】:
我正在开发一个使用 ASP.NET 检索 Google Drive 文档列表的项目,但出现错误:
发生错误:Google.Apis.Requests.RequestError 每日限制 已超过未经验证的使用。继续使用需要注册。 [403]
这是我的网站(此链接出现错误):http://www.netdesklive.com/
我正在为此尝试 DrEdit 代码,但无法正常工作。
我按照https://developers.google.com/drive/examples/dotnet 设置了所有凭据,但仍然出现错误
所以请给我建议
代码:
-> 我在状态和代码中得到空值
public ActionResult Index(string state, string code)
{
try
{
IAuthenticator authenticator = Utils.GetCredentials(code, state);
// Store the authenticator and the authorized service in session
Session["authenticator"] = authenticator;
Session["service"] = Utils.BuildService(authenticator);
}
catch (CodeExchangeException)
{
if (Session["service"] == null || Session["authenticator"] == null)
{
Response.Redirect(Utils.GetAuthorizationUrl("", state));
}
}
catch (NoRefreshTokenException e)
{
Response.Redirect(e.AuthorizationUrl);
}
DriveState driveState = new DriveState();
if (!string.IsNullOrEmpty(state))
{
JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
driveState = jsonSerializer.Deserialize<DriveState>(state);
}
if (driveState.action == "open")
{
return OpenWith(driveState);
}
else
{
return CreateNew(driveState);
}
}
【问题讨论】:
-
嗨,我在这个netdesklive.com/download/DrEdit.rar上放了相关代码
-
请帮我解决这个问题
-
您应该取出相关代码并将其发布在问题中。您不能要求任何人下载您的
.rar并自己找到它。 -
我在下面放了相关代码,请帮我解决