0

目前我正在研究 Google DATA 日历和联系人 API。我编写了一个 Web 应用程序来通过 Google 数据 API 访问公共日历。它在本地运行良好。

在 Azure Emulator 中部署此应用程序后,它停止工作说

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;
                  :
                  :
                }
             }

你能在这方面帮助我吗?

4

1 回答 1

0

问题得到解决。我尝试将 webrole 保持在 HWC 模式。要使用 hwc,请打开 csdef 文件。删除部分。

请访问链接 http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/9fd8432e-ab14-44f6-823a-7e609c3ec655

于 2011-03-16T08:26:07.620 回答