部署“后出现错误”谷歌数据API” Windows Azure 应用程序模拟器中的应用程序

发布于 2024-10-22 07:35:06 字数 1383 浏览 2 评论 0原文

目前我正在研究 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月蹉跎了容颜 2024-10-29 07:35:06

问题已解决。
我尝试将 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文