Why is access to the path denied?

前端 未结 29 1122
刺人心
刺人心 2020-11-22 15:25

I am having a problem where I am trying to delete my file but I get an exception.

if (result == \"Success\")
{
     if (FileUpload.HasFile)
     {
         t         


        
29条回答
  •  情话喂你
    2020-11-22 16:01

    If this is an IIS website that is having the problem, check the Identity property of the advanced settings for the application pool that the site or application uses. You may find that it is set to ApplicationPoolIdentity, and in that case then this is the user that will have to have access to the path.

    Or you can go old style and simply set the Identity to Network Service, and give the Network Service user access to the path.

提交回复
热议问题