Google calendar can't import my ical file

∥☆過路亽.° 提交于 2020-01-06 13:56:12

问题


Assume I have some controller "Controller" and public method in it:

public ActionResult GetICal(int? param1, int? param2)
{
    string cal = "";
    //some logic goes here
    return File(Encoding.UTF8.GetBytes(cal), "text/calendar", "calendar.ics");
}

Then I'm trying to export it to Google Calendar via url: https://my.site.com/controller/getIcal?param1=0&param2=1

And then nothing happens. Once i've got message like "Can't fetch url" (or simething like that).

I don't know, what I'm doing wrong. This url is 100% accessible without authorization. And if I'm adding this calendar via file, everything is going ok (so calendar has correct format).


回答1:


I have the same problem now - what I had to change, and what is the problem as I see it, is parameters in my url. With any parameters it always end up with error message "Can't fetch url".

But when I used google URL shrinker, and added calendar as this shrinked URL, like http://goo.gl/XXXXX, it worked on first try.




回答2:


What type of SSL certificate has your server? Self-signed? We had similar issue:

  1. when we used normal "http", iCal feed was imported correctly
  2. when we used "https" with self-signed certificate, Google Calendar did not import the feed, but with goo.gl service as mentioned ppetak it was OK
  3. when we used "https" with Class 2 certificate verified by GoDaddy.com, situation was same as in 2)
  4. when we used "https" with Class 3 certificate verified by VeriSign everything works properly


来源:https://stackoverflow.com/questions/19764216/google-calendar-cant-import-my-ical-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!