If you use impersonation. The answer is to give the user permission to impersonate access to the following folders:
C:\Windows\Microsoft.NET\Framework[v4.0.30319 or the version that you're using]\Temporary ASP.NET Files
Directory of your site.
You may also need to create a folder as follows:
C:\Windows\Microsoft.NET\Framework\[v4.0.30319 or the version that you're using]\Temporary ASP.NET Files\[Application-Name-Goes-Here]
But first try the previous one, it worked for me.
These two changes gave the impersonated user permission to save temporary data, as well as receive dll files and any necessary files from directories.
Update, for Windows 10 This is a solution that worked for me
We will do both steps, but instead of C:\Windows\Microsoft.NET\Framework[v4.0.30319 or the version that you're using]\Temporary ASP.NET Files
Write% TEMP% to Explorer and give the user permission to impersonate access to the following folder: C:\Users\[UserName]\AppData\Local\Temp\Temporary ASP.NET Files
Mostafa Elabbady Feb 08 '18 at 13:43 2018-02-08 13:43
source share