I need to configure two websites that need to have access to two different network folders
(for example website1
needs access to X:/netfolder1/
and website2
needs access to X:/netfolder2/
)
I've read the following two articles:
https://learn.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities
And
https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/www-authentication-authorization/understanding-identities
And it says the following:
An application pool identity allows you to run an application pool under a unique account without having to create and manage domain or local accounts>
Assuming I created two app pools: website1
and website2
I then need to add each to the matching website's folder users and give it right permissions (adding IIS AppPool\web1
to web1 folder and
IIS AppPool\web2
to web2 folder)
It works and each website runs. Both use the ApplicationPoolIdentity
But now the part where each website needs access to a different network folder is problematic because the article also says:
The good news is that application pool identities also use the machine account to access network resources. No changes are required.
So if I understand correctly, it means that in the network folder I need to add the computer name to the users list and give it the permissions I want. But in this case I can't separate between the websites because both use the same ApplicationPoolIdentity
so if I give access to one website access to certain folder, all websites using ApplicationPoolIdentity
will have access to that folder.
But then I was thinking that I can just create another custom ApplicationPoolIdentity
, but realized it's not possible, there's only one built in identity.
And if I want to add another identity, it's going to be a custom account as seen in the second article.
But then it contradicts with the first statement that I can
run an application pool under a unique account without having to create and manage domain or local accounts
Because a custom account is a real account, in my case a domain account. Because by creating 2 different domain accounts, I can assign each to a different folder over network.
Or, there is a way to only use ApplicationPoolIdentity
while separating access on the network folder? Or ApplicationPoolIdentity
is just the default identity and I can't expect to use it for everything, much like the Default Website
?