1

I am writing an UWP application. I am trying to generate a file sharing token for an email attachment opened with my App. However, this is raising an exception "Access denied"

    //App.xaml
    protected override void OnFileActivated(FileActivatedEventArgs args){
         String sharingToken = SharedStorageAccessManager.AddFile((StorageFile)args.Files[0]);
    }

Is there any alternative to share a temporary file between UWP apps?

gunturu mahesh
  • 113
  • 4
  • 9
  • I have tested with add the specific file with fileopen picker, it works well, could you check if args.Files contains file? – Nico Zhu May 10 '21 at 01:45
  • @NicoZhu-MSFT, Not by using the filepicker, if you try to open an email attachment with the UWP app, then `SharedStorageAccessManager.AddFile((StorageFile)args.Files[0])` is giving access denied error. – gunturu mahesh May 10 '21 at 16:58
  • Could you mind share a code sample that could reproduce this problem? – Nico Zhu May 11 '21 at 01:03

0 Answers0