IE的VCS文件下载问题

时间:2010-02-01 10:36:08

标签: asp.net vcalendar

我正在开发基于http(非安全)的Web应用程序。在此,我提供了一项规定,为客户的展望日历添加一些约会。我在单击超链接时动态创建.vcs文件。生成.VCS文件的代码是:

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

除了IE之外,它在所有浏览器中都运行良好。它给了我以下错误:

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.

有人可以关注它吗?

1 个答案:

答案 0 :(得分:0)

您可以尝试:Content-Type: text/x-vCalendar

否则你的代码看起来对我来说......你可以检查HTTP headers you're getting以确定。