Why is access to the path denied?

前端 未结 29 1616
刺人心
刺人心 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 15:42

    For those trying to make a UWP (Universal Windows) application, file permissions are much more restricted, and in general is deny by default. It also supersedes the system user permissions. You will basically only have access to files in either

    • Your install location
    • Your AppData location
    • Files selected through the File or Folder picker
    • Locations requested in your App Manifest

    You can read more here for details => https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions

提交回复
热议问题