2
私はこの直接メソッドを呼び出していますが、私は、ファイルをダウンロードしようとすると、私は(パスがOKとテストである)、このエラーが表示されます。C#のファイルのダウンロード - BADRESPONSE:無効または予期しないトークン
[DirectMethod]
public void downloadFile(string fname, string ftype)
{
HttpContext.Current.Response.ContentType = "APPLICATION/OCTET-STREAM";
String Header = "Attachment; Filename=" + fname;
HttpContext.Current.Response.AppendHeader("Content-Disposition", Header);
System.IO.FileInfo Dfile = new System.IO.FileInfo(HttpContext.Current.Server.MapPath("CopyFiles\\" + ftype + "\\"+ fname));
HttpContext.Current.Response.WriteFile(Dfile.FullName);
HttpContext.Current.Response.End();
}
BADRESPONSE:無効または予期しないトークン