我使用AbcPdf,..生成pdf后,我想将其保存到某个文件夹中,例如"generatedPdf"
string path = "C:\project-name\wwwroot\generatedPdf\";
try{
theDoc.Save(path);
theDoc.Clear();
}
catch (Exception ex)
{
throw new Exception(ex.ToString());
}
错误消息是 :
无法将 PDF 写入磁盘。视窗错误 5。访问被拒绝。
对于此文件夹,我为 IISUser 和系统用户 => 完全控制设置了
权限我做错了什么?
您必须提供文件名:
string path = "C:\project-name\wwwroot\generatedPdf\somefile.pdf";
^^^^^^^^^^^^