[英]Aspnet core where to find default app pool name of a project
While I am attempting to save static files in the wwwroot, my aspnet core app throws:当我尝试在 wwwroot 中保存静态文件时,我的 aspnet 核心应用程序抛出:
UnauthorizedAccessException: Access to the path <path> denied.
I have already found the solution here: https://stackoverflow.com/a/48935373/8475133 , but I cannot get the right application pool name: DefaultAppPool and IIS AppPool\\DefaultAppPool does not work.我已经在这里找到了解决方案: https : //stackoverflow.com/a/48935373/8475133 ,但我无法获得正确的应用程序池名称:DefaultAppPool 和 IIS AppPool\\DefaultAppPool 不起作用。 Where to find it?在哪里可以找到它?
Open IIS Manager, select your website in left hand pane, and then click Basic Settings
in the right hand pane.打开 IIS 管理器,在左侧窗格中选择您的网站,然后单击右侧窗格中的Basic Settings
。 It will display a modal dialog and from here you can find the Application pool used by your application Pool它将显示一个模式对话框,从这里您可以找到您的应用程序池使用的应用程序池
Next, select the Application Pools in left pane, and the then click Advanced Settings
in right pane.接下来,在左窗格中选择应用程序池,然后在右窗格中单击Advanced Settings
。 It will show the Application Pool properties.它将显示应用程序池属性。 Identity
property is set to ApplicationPoolIdentity
Identity
属性设置为ApplicationPoolIdentity
Note: Since you are deploying ASP.NET Core application ensure your .NET CLR Version
property is set to No Managed Code
注意:由于您正在部署 ASP.NET Core 应用程序,请确保您的.NET CLR Version
属性设置为No Managed Code
Next for setting the write permissions for Application Pool User, select your website in left pane, right click and then click Edit Permissions
.接下来为应用程序池用户设置写入权限,在左窗格中选择您的网站,右键单击,然后单击Edit Permissions
。 In the opened dialog box, go to the Security tab and then click Edit
.在打开的对话框中,转到“安全”选项卡,然后单击“ Edit
。 Click Add
and then type in the Application Pool Identity user.单击Add
,然后键入应用程序池标识用户。 The format for Application Pool user is IIS AppPool{Application pool name} for example for DefaultAppPool the username will be IIS AppPool\\DefaultAppPool
.应用程序池用户的格式为IIS AppPool{应用程序池名称} ,例如 DefaultAppPool 的用户名将是IIS AppPool\\DefaultAppPool
。 Next click on Check Names
button and in case of valid name the username will be underlined in the TextArea.接下来单击“ Check Names
按钮,如果名称有效,则用户名将在 TextArea 中加下划线。 Finally click OK
.最后点击OK
。
Next with the IIS App Pool user selected, check the Modify
checkbox and click OK.接下来选择 IIS 应用程序池用户,选中Modify
复选框并单击确定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.