简体   繁体   English

通过Process写入文件夹-ASP.NET和Windows Server 2008 R2

[英]Writing to folder through Process - ASP.NET and Windows Server 2008 R2

I generate PDF files from HTML page through wkhtmltopdf (using Process from C#). 我通过wkhtmltopdf(使用C#中的Process)从HTML页面生成PDF文件。

On local system (Windows 7) it's works, but on Windows Server 2008 R2 I have "System.IO.FileNotFoundException". 在本地系统(Windows 7)上可以运行,但是在Windows Server 2008 R2上我具有“ System.IO.FileNotFoundException”。 wkhtmltopdf executed by Process (C#) not have enough permission to write file. 由Process(C#)执行的wkhtmltopdf没有足够的权限来写入文件。

I tested a lot of folders (in example: "APPDIR/Content/temp"), but I have no idea what should I do. 我测试了很多文件夹(例如:“ APPDIR / Content / temp”),但我不知道该怎么办。

The process your application runs as, has to have sufficient permissions to write to a folder. 您的应用程序运行的过程必须具有足够的权限才能写入文件夹。

Your (most likely judging by ASP.NET tag) website can be configured to run as any user you want in IIS management console. 您的网站(很可能由ASP.NET标记判断)可以配置为在IIS管理控制台中以所需的任何用户身份运行。

By default the application pool runs as ApplicationPoolIdentity and to grant access permissions to it you would use: IIS AppPool\\ApplicationPoolName account. 默认情况下,应用程序池作为ApplicationPoolIdentity运行,并向其授予访问权限,您将使用: IIS AppPool\\ApplicationPoolName帐户。

You can also change the application pool to run as another account and configure folder permissions for that account instead. 您还可以将应用程序池更改为作为另一个帐户运行,并为该帐户配置文件夹权限。

You will have to type the full account name in the box as search is an Active Directory feature and doesn't work as expected for local accounts (In Select Users or Groups dialog) 您将必须在框中输入完整的帐户名称,因为搜索是Active Directory功能,并且无法按预期在本地帐户中使用(在“选择用户或组”对话框中)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 asp.net中Windows Server 2008 R2上的PDF缩略图 - PDF Thumbnails on windows server 2008 R2 in asp.net 30秒后在ASP.NET上超时,在SQL Server 2008 R2上没有超时 - Timeout on ASP.NET after 30 seconds, on SQL server 2008 R2 no timeout 存储过程不返回任何数据asp.net sql server 2008 r2 - store procedure don't return any data asp.net sql server 2008 r2 使用SQL Server 2008 R2在ASP.NET C#中创建Crystal Report - Creating Crystal Report in asp.net c# with SQL Server 2008 R2 部署使用Asp.Net,C#和Sql Server 2008 R2构建的Web应用程序 - Deploying an Web Application built using Asp.Net,C# and Sql Server 2008 R2 C#ASP.NET无法将联系页面上传到SQL Server 2008 R2 - C# ASP.NET trouble uploading contact page to SQL Server 2008 R2 使用SqlParameter实现C#ASP.NET和SQL Server 2008 R2的安全性 - Using SqlParameter for security with C# ASP.NET and SQL Server 2008 R2 ASP.net 收到错误“访问路径被拒绝”。 在尝试将文件上传到我的 Windows Server 2008 R2 Web 服务器时 - ASP.net Getting the error “Access to the path is denied.” while trying to upload files to my Windows Server 2008 R2 Web server Windows Server 2008 R2中未运行quartz.net作业 - quartz.net job not running in windows server 2008 R2 在Windows Server 2012 R2上运行Asp.net 5 vNext项目(MVC6)发布生成 - Run Asp.net 5 vNext project (MVC6) publish build on Windows Server 2012 R2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM