views:

32

answers:

1

I am working on a http based (NOT Secure) Web Application. In this, I have provided a provision to add some appointment to the Client's outlook calendar. I am creating the .vcs file dynamically when clicked on a hyperlink. The code of generating .VCS file is:

string calendarFormat = GetVCSFormat();
Response.ContentType = "text/calendar";
Response.AppendHeader("content-disposition", "attachment; filename=MyCalendar.vcs");
Response.Write(calendarFormat);
Response.End();

It is working fine in all browsers except IE. It is giving me following error:

Internet Explorer cannot download GenerateAppointment.aspx from server. 
Internet Explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found.  Please try again later.

Can anyone focus some light on it?

A: 

You could try: Content-Type: text/x-vCalendar

Otherwise you're code looks right to me... You could check the HTTP headers you're getting to be sure.

zeroasterisk