gpt4 book ai didi

c# - .ics 文件无法在适用于 Apple 设备的 Chrome Mobile 中打开

转载 作者:行者123 更新时间:2023-11-30 15:34:11 25 4
gpt4 key购买 nike

我收到错误 102 ():未知文件类型。尝试从 ASP.Net 应用程序下载 .ics 文件时。该文件如下所示:

BEGIN:VCALENDAR
PRODID:-//Test
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
UID:uid
CLASS:PUBLIC
DTSTART:20130506T173000
DTEND:20130506T190000
DESCRIPTION;ENCODING=QUOTED-PRINTABLE: What would you do with an extra $2500?
SUMMARY:Smoking Cessation May
PRIORITY:0
LOCATION:ARMC Theater
END:VEVENT
END:VCALENDAR

我在 C# 中的响应代码是这样的:

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}.ics", "example"));
HttpContext.Current.Response.ContentType = "text/calendar";
HttpContext.Current.Response.Write(calendarData.ToString());
HttpContext.Current.Response.End();

有什么建议吗?

最佳答案

我读过的所有内容都表明无法通过 Chrome Mobile 实现。如果您找到答案,我也会感兴趣。

如果有任何帮助,我知道可以通过 Safari Mobile 实现。答案在这里:

How do you add a link that will add an event to your iPhone calendar from safari?

对于 Safari Mobile,解决方案是简单地链接到 .ics 文件,但在 iOS 5 之前,这对于 Safari Mobile 甚至是不可能的。

对不起,祝你好运!

关于c# - .ics 文件无法在适用于 Apple 设备的 Chrome Mobile 中打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16546525/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com