我创建了一个 pdf 文档
var document = new Document();
string path = Server.MapPath("AttachementToMail");
PdfWriter.GetInstance(document, new FileStream(path +
"/"+DateTime.Now.ToShortDateString()+".pdf", FileMode.Create));
现在我想下载这个文件
Response.ContentType = "Application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename="+
DateTime.Now.ToShortDateString() + ".pdf" + "");
Response.TransmitFile(path);
Response.End();
但它给了我错误 访问路径'〜\ AttachementToMail'被拒绝。
存在 IIS_IUSRS 的读/写访问权限