Visual studio run under your default account which has permission to access all the things iis application or site run under the application pool identity which uses iis user like iusr or iis_iusrs which does not have access to use all the things. that's why you get access denied error message. if you want to change the application pool identity you could select your appropriate application pool and set by using the advanced setting. local system and network service have enough access in application pool identity
.
If you want to set load user profile false then you could modify the applicationhost.config file directly to add/manage application pools. To setup enable loading the user profile, you would modify the line related to your application pool and add the below line to it within the XML elements.:
<processModel loadUserProfile="true" />
You could refer below link for more detail:
What exactly happens when I set LoadUserProfile of IIS pool?
loadUserProfile and IIS7 - understanding temporary directory failures
Access denied when reading system event log entries on ASP.NET web application hosted on IIS 8