Question

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).

Was it helpful?

Solution

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.

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top