When the application is deployed to a subfolder under the IIS Web root, the first access to the application always failed while the subsequent access is successful.
Cause:
When tracking the request using Fiddler, the CreateSession request failed at the first access to the application, and the following error message is returned: errmsg=Access to the path 'C:\inetpub\wwwroot\App\AppConfig\License.json' is denied.
Solution 1:
Grant Internet Guest Account and IIS Process Account proper rights to manipulate the Web Root folder. Below are the detailed steps:
-
Right-click on the C:\Inetpub\wwwroot folder. Select the Properties item and select the Security tab page;
-
Add IIS_ISERS(or NETWORK SERVICE) if it is not listed in the box "Group or usernames";
-
Grant Full Control permission to the IIS_ISERS (or NETWORK SERVICE).
-
Restart the IIS server (iisreset.exe).
-
If the issue persists, please try granting "everyone" user full control permission on the C:\inetpub\wwwroot\[appname] folder.
Solution 2:
Refer to the article below to set an account in the administrator group to the Identity property for DefaultAppPool: https://campuslogicinc.freshdesk.com/support/solutions/articles/5000713210-changing-identity-user-for-iis-application-pool.
Restart the IIS server (iisreset.exe).