【发布时间】:2013-01-11 06:36:32
【问题描述】:
我在 Visual Studio 中构建了一个程序。该程序创建一个日志文件并在程序通过 log4net 运行时写入其中。因此,无论哪个用户使用该程序,我都应该为我的程序文件夹设置写权限。
当我访问我的应用程序时,它会抛出错误
文件访问被拒绝
所以我做了什么,我在那里给了 iis_users 管理员权限,它工作正常......
但我的问题是没有设置我应该能够通过 iis 运行我的应用程序的权限
所以我已经完成了
1) 创建 app.manifest 文件,代码为
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel node will disable file and registry virtualization.
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
</requestedPrivileges>
但这并不能帮助我解决这个问题
【问题讨论】:
-
您可能应该评论您的应用程序与 IIS 的关系。很明显,您不是在谈论网站/ASP.net 或网站上使用的程序集。另一方面,您声明“通过 IIS 运行我的应用程序”,这意味着某种关系......