Access Denied When C# WinRT Component Tries to create file


  • Hello,

    I have a sample app (C++/CX Store app) that imports a C# .winmd (WinRT Component). When I import the .winmd file the import seems to go fine, the issue is when I access a method in the .winmd component. What the method does is try and create a file in the directory that the app is installed. So from my C++ store app I send a parameter to the WinRT Component method that gives the installation directory, and the .winmd WinRT component takes that directory and tries to create a file in that directory. Unfortunately when it does that I get an exception, I catch the exception and get the following error:  

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    Is there a way to allow that .winmd that I reference create a file in that location?

    Saturday, July 27, 2013 4:13 AM