I've created a new ASP.NET MVC 4 app in VS2012. Target is .NET 4.5.
I created a CalendarController ApiController with a single method that returns an HttpResponseMessage with text content that complies with the iCal specification.
I want this method to be served from a URL that looks like this:
http://www.example.com/api/calendar/mycalendar.ics
but I can't create the appropriate routing config to make this happen.
I can get this to work:
http://www.example.com/api/calendar/mycalendar
but I need the .ics extension.
Why do I need the extension you might ask. The answer is that iOS interprets the URL with the .ics extension as a signature of a "subscribed" calendar. Without the extension, it interprets the calendar as a set of events that are copied and does not create a "subscription".
Any help is appreciated