WebCal .ics files to iPad's on IIS 7.5 not working

When asked by a client how to "let iPad users see a corporate calendar", we considered a few options, but the discussion finally turned to the calendar subscription component of Apple's IOS.  Luckily, this component is a fairly easy one to utilize, and utilizes a published *.ics file on a web-server to be connected to, and easily updated on the server-end with a new file version for updates to cascade to all clients.  This is a pretty slick solution, made even easier through Microsoft Outlook calendar publishing through WebDAV.  Unfortunately, the implementation did not go as smoothly as one would expect. 

After creating a test .ics file, and publishing to an IIS 7.5 server, we could download the file using http or https, but unable to connect using the 'webcal://' link to the file required to trigger the event-handler in IOS to subscribe to the calendar.  Similar results were noticed when trying to manually configure the calendar subscription.  Something wasn't matching up, and unfortunately Apple's documentation wouldn't provide any clues.  This prompted the breakdown of all components in the chain.  UAG was removed, check.  HTTPS removed, check.  IIS uninstalled/reinstalled, check.  New test file, check.  Networks/firewalls between the two devices removed, check. Still, no luck.  One thing that I did notice was the putting the file on a third-party hosted site would work, ::head-scratching::

Finally, after doing a packet trace, and realizing that the web-server was rejecting the type of the message, we identified the root cause: MIME-Type!  

After setting IIS 7.5 .ics file MIME-Type to 'application/calendar' everything started coming together, and the webcal:// . Calendar's are able to be subscribed to, and can even include authentication if required.

This helped me, hopefully it will help you.

Labels: , , , , , ,