UnauthorizedAccessException: Access to the path denied:
Here are 3 solution to resolve this issue.
1). Need to modify the privileges of folder for IIS_IUSRS account which is member of the Guests group and has security restrictions. You can add the read/write privileges from security tab.
2). Use impersonation to access the local system resources either in code or config file. Add <identity impersonate="true"> in config or machine.config file.\
3). Grant privileges to Network service user.