Q:

save web.config error access denid

i search but i cant find a solution for this problem.
when i want to save web.config i recieve this error:
An error occurred loading a configuration file: Access to the path 'E:\vhosts\some.ir\httpdocs\egqz2vnh.tmp' is denied.
i use this code for access and save webconfig:
     var config = Misconfiguration.OpenWebConfiguration("~");
config.AppSettings.Settings["name"].Value = txt1.Text;

    config.Save();

i use Plesk for upload website.do need set permission for current user to access web.config in ftpaccess?
any idea?
thanks

A:

Modify your website folder permssion.
For example with plesk  (in file manager), I clicked on "change access right to the file or directory" (for website container directory , not web.config). Then I changed permissions on "Default Plesk application pool user (IWAM_plesk(default))". 
Hope it helps

