开发者

Creating a CalDAV service with .Net

开发者 https://www.devze.com 2022-12-13 04:08 出处:网络
I want to create a calendar in my application that external users can view. The CalDAV (basically WebDAV+iCalendar) format seems to be relatively widely supported, although if rather unusually by som

I want to create a calendar in my application that external users can view.

The CalDAV (basically WebDAV+iCalendar) format seems to be relatively widely supported, although if rather unusually by some clients (Outlook, for instance). Completely new to me though.

I want to externally publish events, I don't need users to be able to update them.

The text format of events in .ics files appears relatively simple:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN

BEGIN:VEVENT
DTSTART:20091130T000000Z
DTEND:20091201T000000Z
SUMMARY:Test event for calendar format
LOCATION:Company site
DES开发者_JAVA百科CRIPTION:Test event.\nMore text on a new line
END:VEVENT

END:VCALENDAR

However I don't really want to write my own ics file builder. The key names starting on each line don't seem to be very consistent between ics files too.

Is there a .Net implementation out there? Ideally I don't want to set up a whole WebDAV implementation - just the ability to retrieve a read-only calendar.

I mainly want this to be at a url that users can sync from iPhone, Android and Blackberry phones. I know that they can handle CalDAV services from some suppliers but not others (for instance my iPhone can sync from Google calendar but fails with FaceBook's events) - anyone have any idea why?

I think events can also contain MIME attachments - is this sufficiently supported to be worth looking into too?

Update

Further research on this has identified some weird inconsistencies in most implementations. None of the major mobile client OSs (iPhone, Blackberry, Android) can handle .ics files.

However iPhones can open an .ics from a URL (choose to subscribe to a calendar) and this does work with FaceBook too. Blackberry and Android can't however. I think the Blackberry can handle the full CalDAV option (rather than just the .ics file) but don't know much about programming for it.

Is there a consistent way to do this out there?


I've used http://sourceforge.net/projects/dday-ical/ for a project last year. Works perfectly!


The company IT Hit WebDav System offers

  • IT Hit WebDAV Server Engine v3 for .Net (starting at $ 1250)) and
  • a IT Hit WebDAV Client .Net (starting at $350).

It works with iOS Calendar, Android CalDAV-Sync, Mac OS X Calendar, Mozilla Lightning, eM Client, Bynari Outlook plugin, Evolution and others.


If what you are looking for is a CalDAV Client then my suggestion is DAVDroid, this is the best CalDAV Client I have never tried. It's a connector for the calendar account of your phone allowing to consume the data from your CalDAV Server from any Calendar App installed on your phone.

Other interesting CalDAV Clients are:

Windows:

  • Mozilla Thunderbird with Lightning extension: The main problem of this Client is that dosent have auto-discovery so you will have to write the route of your collection.

If you are looking for a ICalendar library for .NET you can check the one my friend and I build: ICalendar

Any doudt you can ask us!!!

0

精彩评论

暂无评论...
验证码 换一张
取 消