C# 如何创建人们可以订阅的 ICalendar 提要

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1156140/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 09:34:40  来源:igfitidea点击:

How to create an ICalendar Feed that people can subscribe to

c#.netvb.neticalendar

提问by

I need to create a application in vb.net that puts out those cool <<Subscribe to ical>>links, which I can prefill with our events and milestones. While I have figured out I need to use DDay.ical.dll to get the events into a .icsfile, I am not clear about how to get these to publish. I was thinking of using an RSS feed, but that defeats the purpose of using icals and would require a RSS to ICal converter,which seems unnecessary.

我需要在 vb.net 中创建一个应用程序来发布那些很酷的<<Subscribe to ical>>链接,我可以预先填充我们的事件和里程碑。虽然我发现我需要使用 DDay.ical.dll 将事件放入.ics文件中,但我不清楚如何发布这些事件。我正在考虑使用 RSS 提要,但这违背了使用 icals 的目的,并且需要一个 RSS 到 ICal 转换器,这似乎是不必要的。

回答by C. Dragon 76

You can host the .ics files with any web server such as IIS.

您可以使用任何 Web 服务器(例如 IIS)托管 .ics 文件。

For example, if you create a web application at http://foowith virtual directory X:\Foo, and your VB.net app saves a calendar to X:\Foo\iCal\Calendar1.ics, others can consume the iCal feed at http://foo/iCal/Calendar1.ics.

例如,如果您在http://foo上创建一个具有虚拟目录 X:\Foo的 Web 应用程序,并且您的 VB.net 应用程序将日历保存到 X:\Foo\iCal\Calendar1.ics,则其他人可以使用 iCal 提要在http://foo/iCal/Calendar1.ics