下面是iis7.5和ASP的一个问题。NET,我一直在研究,但毫无进展。任何帮助都将不胜感激。
我的问题是:使用ASP。在IIS 7.5中,IIS和/或操作系统如何允许web应用程序在完全信任下运行时写入像C:\dump这样的文件夹?为什么我不需要显式地为应用程序池用户(在本例中是ApplicationPoolIdentity)添加写访问权限?
我知道这么多:
In IIS 7.5, the default Identity for an Application Pool is ApplicationPoolIdentity. ApplicationPoolIdentity represents a Windows user account called "IIS APPPOOL\AppPoolName", which is created when the Application Pool is created, where AppPoolName is the name of the Application Pool. The "IIS APPPOOL\AppPoolName" user is by default a member of the IIS_IUSRS group. If you are running under Full Trust, your web application can write to many areas of the file system (excluding folders like C:\Users, C:\Windows, etc). For example, your application will have access to write to some folders, like, C:\dump. By default, the IIS_IUSRS group is not given read or write access to C:\dump (at least not access that is visible through the "Security" tab in Windows Explorer). If you deny write access to IIS_IUSRS, you will get a SecurityException when trying to write to the folder (as expected).
那么,考虑到所有这些因素,如何将写访问权限授予“IIS appppool \AppPoolName”用户?w3wp.exe进程作为该用户运行,那么是什么允许该用户写入它似乎没有显式访问权限的文件夹呢?
请注意,我理解这样做可能是为了方便,因为如果您在完全信任下运行,那么授予用户对需要写入的每个文件夹的访问权将是一件痛苦的事情。如果希望限制这种访问,可以始终在Medium Trust下运行应用程序。我对操作系统和/或IIS允许这些写入的方式感兴趣,即使似乎没有显式授予文件系统访问权。