ICS from webservice
-
I’m having a bit of a problem with sourcing the ICS from a webservice.
The file is generated thus:
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(sb.ToString());var dataStream = new MemoryStream(buffer);
HttpResponseMessage httpResponseMessage = Request.CreateResponse(HttpStatusCode.OK);
httpResponseMessage.Content = new StreamContent(dataStream);
httpResponseMessage.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue(“attachment”);
httpResponseMessage.Content.Headers.ContentDisposition.FileName = “cal.ics” ;
httpResponseMessage.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(“application/octet-stream”);return httpResponseMessage;
Where ‘sb’ contains the calendar data.
Now if I open the link to the webservice in a browser, save the file and then point ICS Calendar at the file it works fine. If I point ICS Calendar at the webservice it fails.
Any ideas?
Thanks
- The topic ‘ICS from webservice’ is closed to new replies.