问题描述
假设我有它的一些控制控制者和公共方法:
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");
}
然后我试图通过URL将其导出到谷歌日历:
和则什么也不会发生。一旦我得到的消息,如无法获取网址(或simething这样)。
And then nothing happens. Once i've got message like "Can't fetch url" (or simething like that).
我不知道,我在做什么错。这个URL是擅自100%的访问。而如果我通过文件中添加此日历,一切都很OK(所以日历有正确的格式)。
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).
推荐答案
我现在有同样的问题 - 我不得不改变什么,是什么问题,因为我看到它,在我的网址参数。对于任何参数,它总是结束了错误消息无法获取URL。
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".
但是,当我使用谷歌URL收缩,并添加日历本萎缩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.
这篇关于谷歌日历无法导入我的iCal文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!