Reputation: 22404
Are there any official sources for programming an Outlook "internet calendar subscription ", described in the link as
An Internet Calendar Subscription is a calendar that you download and view in Outlook. However, unlike a Calendar Snapshot, Internet Calendar Subscriptions are updated automatically.
I'm using ASP.NET MVC and the DDay.iCal library. I have been unsuccessful creating such a calendar. I need answers to specific questions. I'm tired of guessing. And I won't accept random code, links to out-of-date codeproject articles, or anything else non-authoritative.
The only concrete information I have is that the URL must
webcal://
.ics
filenameI have to generate a unique and up-to-date calendar per user, preferably every time Outlook polls the address. I want to avoid hooking the calendar updates into the CRUD parts of the site. So, I need to know some specifics about what Outlook accepts.
Can I use a controller/action that returns a FileResult
(or derivative: stream, content, path) to dynamically generate the calendar when Outlook hits the address?
Can I "fake" the ICS file/filename part of the URL by decorating the action, like [ActionName("iCalFeed.ics")]
?
Can I use an ActionLink
to create the webcal
link for the action, like <%= Html.ActionLink("Connect to Outlook", "iCalFeed.ics", "Schedule", "webcal", null, null, null, null) %>
?
I've tried some of these things in an ad-hoc fashion and Outlook loves to pop up and handle webcal
links, but it shows nothing and displays no error messages. Is there somewhere to dig for Outlook web calendar import errors?
If no to the above questions, is there another way to serve fresh contents every time Outlook polls the address? I'd rather not update the calender in sync with the CRUD operations on the site. That seems more complicated than is necessary.
Either way, I also need to know what parts of the iCalendar specification Outlook requires to have a properly updating "subscription". I imported a valid ICS file as a regular "snapshot" with as little as a start/end date, summary, and location. But, apparently, there are some tricky parts of the spec, like
Do I have to set the METHOD
(RFC2445 4.7.2 Method)? I can't even find a decent description of this property or the values it accepts (is it client specific?).
Do I have to keep track of event UIDs and change their disposition based on my system's CRUD operations? Or is adding/removing/updating the events from the calendar on subsequent polling good enough for Outlook to figure it out? If I have to keep track, now I have to add a whole layer of persistence and state-awareness to my application.
If I'm keeping track, I've noticed in other SO questions that Outlook is real picky about the ORGANIZER
property... does it have to be an email address or not? A mailto:
link or just an address?
I'm at the end of my rope. I'm willing to read documentation if it answers questions about actually building a website that generates proper calendar subscriptions. I haven't found anything on MSDN except this strange conversion "algorithm". And, as far as I can tell, it's useless.
Upvotes: 8
Views: 1207
Reputation: 120576
Do I have to set the METHOD (RFC2445 4.7.2 Method)? I can't even find a decent description of this property or the values it accepts (is it client specific?).
For the methods, see the WebDav and CalDav specs.
Calendaring Extensions to WebDAV (CalDAV
This document defines extensions to the Web Distributed Authoring and Versioning (WebDAV) protocol to specify a standard way of accessing, managing, and sharing calendaring and scheduling information based on the iCalendar format. This document defines the "calendar-access" feature of CalDAV.
METHOD (RFC2445 4.7.2 Method)?
RFC 2445 was obsoleted by RFC 5545 so you might be interested in differences between 5545 and 2445 so that you can try to fit into the intersection of the two.
I'm at the end of my rope. I'm willing to read documentation if it answers questions about actually building a website that generates proper calendar subscriptions.
All of these standards are maintained by CalConnect which has discussion lists that you might find of use.
Sorry I can't be of more use, since I have very little personal practical experience with Outlook, but there are a lot of people involved with CalConnect who know all the interop minutiae.
Upvotes: 1
Reputation: 22404
I haven't found any proper documentation yet, but I have discovered some of Outlook's behaviors. Regarding the webcal/ics requirement for an "internet calendar subscription"
http://
address.ics
You can try these for yourself in Outlook | Open Calendar | From Internet. You probably still want to use an ActionLink
/webcal link so that your browser prompts you to launch an application that can handle the request.
As for the rest of the controller/action requirements...
FileResult
kind of controller action<location>
tag with <allow users="?" />
. If you do need security, look at what Google does. They create a URL containing a GUID token per user/calendar and ask you to protect it.
Upvotes: 0