窗口点打开方法得到页面不能显示下载csv文件的问题

Window dot open method is getting page can't be displayed issue on download csv file

本文关键字:下载 显示 不能 csv 文件 问题 方法 窗口      更新时间:2023-09-26

我们正在使用window.open('https://cerrtificate-name/csv/394099.aspx?mode=-1')从服务器下载csv文件。当我使用http时,它工作得很好,但未能在启用https证书的服务器上工作。

提示"page cannot be display issue"

下面的

在394099中使用。Aspx传输CSV内容

String contenttype  = "application/octet-stream";
string strSourceFilepath = "d:''myfile.csv";
Response.AppendHeader("content-disposition", strContentDisposition+"; filename=myfile.csv");                        
Response.ContentType = contenttype
Response.TransmitFile(strSourceFilepath);
Response.Flush();

为什么这个奇怪的行为为SSL证书启用版本?请帮助我或建议一些事情来解决这个问题。

WebServer          : IIS 7.0
Server Language    : ASP.NET
SSL                : Enabled

你的内容类型不应该是:content -type: text/csv

参见以下

如果你使用IE,你可能会解决这个问题。

c# BinaryWrite over SSL

在IE8中使用ASP通过https下载文件。净