我成功地为 Web 部署配置了 IIS 并添加了一个 IIS 管理器用户。
问题是当我尝试发布时,我返回错误
Error 1 Web deployment task failed. (Unable to perform the operation ("Delete Directory") for the specified directory ("2_0_50727"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER.) C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets 4270 5 WebAPI
简而言之,用户没有权限处理根文件夹内容。我想不通,谁是用户 , 授予权限。
链接的 Microsoft 页面告诉我们,在大多数情况下,它是“本地服务”,而且它已经拥有完全控制权限。所以我尝试了更多的“IUSR”、“DefaultAppPool”——仍然不是正确的。临时解决方案是给“所有人”权限,然后它就起作用了... 但谁是正确的用户 ??
最佳答案
您是否在管理器服务委派中为 IIS 管理器用户添加了规则(contentPath、createApp、dirPath、filePath、iisApp、runCommand)?
我还授予了对 LOCAL SERVICE 站点文件夹的访问权限,因为 Web 管理服务在此帐户下运行,并且由于 Web 部署代理服务而授予 NETWORK SERVICE 访问权限。
关于iis - 配置 Web Deploy IIS 用户权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30400807/