我在我的网站中实现了几个谷歌 API - 以启用联系人导入和 youtube 上传。虽然一切都在本地运行良好(在我自己的开发服务器的本地主机下),但通过站点使用它们存在一些问题(托管在 HostGator 和 1and1 上,我到处都遇到相同的错误) - 似乎是身份验证问题。
该站点位于 ASP.NET 2.0 上,这些是我得到的错误消息:
谷歌联系人的错误(使用 AuthSub) - 这发生在我从谷歌的 authsub 成功接收到会话令牌之后:
The remote server returned an error: (401) Unauthorized. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized. Source Error: Line 493: ContactsQuery query = new ContactsQuery(ContactsQuery.CreateContactsUri("default")); Line 494: Line 495: ContactsFeed feed = service.Query(query); Line 496: Line 497: ArrayList emails = new ArrayList(); Source File: d:\inetpub\vhosts\e-koren.com\httpdocs\home-cooking\EmailInvite.aspx.cs Line: 495
youtube 视频上传错误(使用 ClientLogin):
Invalid credentials Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Google.GData.Client.InvalidCredentialsException: Invalid credentials Source Error: Line 71: // try Line 72: // { Line 73: FormUploadToken _token = request.CreateFormUploadToken(newVideo); Line 74: Line 75: actionURL.Value = _token.Url + "?nexturl=" + Server.UrlPathEncode(Request.Url.ToString()+"?uuc="); Source File: d:\inetpub\vhosts\e-koren.com\httpdocs\home-cooking\youtubeUpload.aspx.cs Line: 73
有谁知道会是什么?
谢谢,阿萨夫