I'm getting an Error 102 (): Unknown File Type. when trying to download an .ics file from an ASP.Net application. The file looks like this:
BEGIN:VCALENDAR
PRODID:-//Test
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
UID:uid
CLASS:PUBLIC
DTSTART:20130506T173000
DTEND:20130506T190000
DESCRIPTION;ENCODING=QUOTED-PRINTABLE: What would you do with an extra $2500? 
SUMMARY:Smoking Cessation May
PRIORITY:0
LOCATION:ARMC Theater
END:VEVENT
END:VCALENDAR
My Response code in C# is this:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}.ics", "example"));
HttpContext.Current.Response.ContentType = "text/calendar";
HttpContext.Current.Response.Write(calendarData.ToString());
HttpContext.Current.Response.End();
Any suggestions?
Everything I've read says it's not possible through Chrome Mobile. If you find an answer, I'd be interested as well.
If it's any help, I know it's possible through Safari Mobile. The answer is here:
How do you add a link that will add an event to your iPhone calendar from safari?
With Safari Mobile, the solution is simply to link to the .ics file, but this wasn't even possible with Safari Mobile until iOS 5.
Sorry, and best of luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With