Getting exception While deleting Folder (Error HRESULT E_FAIL has been returned from a call to a COM component.) RRS feed

  • Question

  • Hi I am getting exception while deleting folder in Windows Store apps 

    I have attached exception snap

    Below is my code snippet

                    StorageFolder fldrname = await ApplicationData.Current.LocalFolder.GetFolderAsync(foldername);
                    await fldrname.DeleteAsync(StorageDeleteOption.PermanentDelete);
                    return true;
                catch (Exception er)
                    return false;


    Friday, February 21, 2014 12:36 PM


  • Why do you think you can delete the LocalFolder?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, February 21, 2014 3:06 PM