部署“后出现错误”谷歌数据API” Windows Azure 应用程序模拟器中的应用程序
目前我正在研究 Google DATA 日历和联系人 API。我编写了一个网络应用程序来通过 Google 数据 API 访问公共日历。它在本地运行良好。
我在 Azure 模拟器中部署此应用程序后,它停止工作并显示
InnerException {“连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立的连接失败,因为连接的主机未能响应 209.85.231.104:443”} System.Exception {System.Net.Sockets.SocketException }
编写的代码:
CalendarService oSrv = new CalendarService("GoogleAPIs_Cal_V1");
EventQuery oQuery = new EventQuery();
oQuery.Uri = new Uri(XXX);
if (strUserName != null && strUserName.Length > 0)
{
oSrv.setUserCredentials(strUserName, strPwd);
}
oQuery.StartTime = DateTime.Now.AddHours(-11);
oQuery.EndDate = DateTime.Now.AddDays(1);
EventFeed calFeed = oSrv.Query(oQuery) as EventFeed;
ArrayList dates = new ArrayList(50);
DataTable dtEvents = FillDataTable();
while (calFeed != null && calFeed.Entries.Count > 0)
{
// look for the one with dinner time...
foreach (Google.GData.Calendar.EventEntry entry in calFeed.Entries)
{
DataRow dtRow = dtEvents.NewRow();
dtRow["EventTitle"] = entry.Title.Text;
:
:
}
}
您能在这方面帮助我吗?
Currently I am working on Google DATA Calendar and Contacts APIs. I have written an web application to access public calendar by Google Data APIs. It is working fine locally.
After I deployed this application in Azure Emulator, it stopped working saying
InnerException {"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 209.85.231.104:443"} System.Exception {System.Net.Sockets.SocketException}
Code that is written :
CalendarService oSrv = new CalendarService("GoogleAPIs_Cal_V1");
EventQuery oQuery = new EventQuery();
oQuery.Uri = new Uri(XXX);
if (strUserName != null && strUserName.Length > 0)
{
oSrv.setUserCredentials(strUserName, strPwd);
}
oQuery.StartTime = DateTime.Now.AddHours(-11);
oQuery.EndDate = DateTime.Now.AddDays(1);
EventFeed calFeed = oSrv.Query(oQuery) as EventFeed;
ArrayList dates = new ArrayList(50);
DataTable dtEvents = FillDataTable();
while (calFeed != null && calFeed.Entries.Count > 0)
{
// look for the one with dinner time...
foreach (Google.GData.Calendar.EventEntry entry in calFeed.Entries)
{
DataRow dtRow = dtEvents.NewRow();
dtRow["EventTitle"] = entry.Title.Text;
:
:
}
}
Can you please help me on this front?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题已解决。
我尝试将 webrole 保持在 HWC 模式。
要使用 hwc,请打开 csdef 文件。删除部分。
请访问链接
http://social.msdn .microsoft.com/Forums/en-US/windowsazuredevelopment/thread/9fd8432e-ab14-44f6-823a-7e609c3ec655
issue is resolved.
I tried by keeping webrole in HWC mode.
To use hwc, open csdef file. remove section.
Please visit link
http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/9fd8432e-ab14-44f6-823a-7e609c3ec655