publish an IIS my asp net core application

sblb 1,166 Reputation points
2022-07-24T17:53:45.337+00:00

Hi, I try to pubish my application aspnet core and follow up the link publish-to-iis
I publish in the repository \bin\Release\net5.0
After that copy/paste the repository in IIS repository.

First of all I received this message
224107-image.png

How can I check that the pool has the acces to write ...?

FYI, when I run the myapp.exe the application is well run.

Thanks in advance

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,157 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 26,191 Reputation points
    2022-07-25T11:15:22.83+00:00

    Right click the physical folder that contains the application. Select properties. Then the security tab. Click Edit. Click the Add button. Enter the application pool identity for you application. If you did not specify an identity then the default identity is the name of the application.

    IIS APPPOOL\name.of.your.application  
    

    Select the authorization your application pool needs. For example, if you are writing files to the physical folder then you need read/write. If your application writes file to other locations on disk then that folder needs read/write as well. In the later case you should consider creating a service account with least privileges. Use the service account as the application pool identity.

    Network Services or Local Services might be an option depending on how your application works.

    Access Control Overview
    Service Accounts

    If you are not sure what the identity is, then open IIS Manager. Open the application pools. Find the application pool for your application, right click, select advanced. settings. Then find the Identity property.

    keep in mind, you posted this under asp.NET MVC but you question is related to IIS or Windows security.