我正在开发基于 http 的(不安全)Web 应用程序。在此,我提供了一项条款,可以在客户的 Outlook 日历中添加一些约会。单击超链接时,我正在动态创建 .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.
任何人都可以重点关注它吗?