开发者

VCS File Downloading Issue with IE

I am working on a http based (NOT Secur开发者_Go百科e) 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜