Go to root node of IIS -> Authentication -> Anonymous Authentication, check which user the anonymous inherits the permissions from, set it to ApplicationPoolIdentity.
Then make sure the ApplicationPoolIdentity has permission to access the folder.
Bruce Ng's software development blog
An archive of solutions of programming problems I have faced in my career
Go to root node of IIS -> Authentication -> Anonymous Authentication, check which user the anonymous inherits the permissions from, set it to ApplicationPoolIdentity.
Then make sure the ApplicationPoolIdentity has permission to access the folder.