创建动态 iCalendar 源
我正在寻找一种使用 .Net 生成 iCalendar 提要的方法,atm 我正在使用 DDay 库生成 iCal 文件并将其写入响应。
问题是,如果我将 URL 提供给 Outlook,它会说它是无效的 ics 文件。
我尝试了各种路线,包括:
使用 MVC 路由,以便链接包含 .ics 扩展名。 更改 Mime 类型,使其为文本/日历。
我发现的一项观察结果是,如果我在浏览器中导航到该 URL,则会生成有效的 iCal 文件并正确导入到 Outlook 中。其次,如果我准确地获取该文件并通过 IIS 将其作为静态内容托管,则 Outlook 会将其视为有效文件。
问题是我需要生成动态提要,并且似乎已经没有办法尝试使其正常工作。
I am looking for a means to generate a iCalendar feed using .Net , atm I am using the DDay library to generate the iCal file and write it to the response.
The problem with this is if I feed the URL to outlook it says that it is a invalid ics file.
I have tried various routes including :
Using MVC routing so that the link contains a .ics extension.
Changing the Mime Type so that it is Text/Calendar.
One observation I have found is that if I navigate to the URL in a browser a valid iCal file is generated and is imported into Outlook correctly. Secondly if I take that exactly file and host it via IIS as static content , Outlook picks it up as a valid file.
The problem is that I need to generate a Dynamic feed and seem to have run out of things to try and get this working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的问题似乎是默认的 asp.net 身份验证阻止了 Outlook,因为它没有进行身份验证,一旦将异常添加到 web.config,URL 就会在 Outlook 中正确加载
It seems the problem in my case was that the default asp.net auth was blocking outlook because it was not authenticating , once a exception was added to the web.config , the URL loaded correctly in outlook