I created a test App with brokered copmonent and it runs smooth on my machine, but when moved it to a tablet and did all the required settings (regsvr32, icacls), it throws an exception. then I went and downloaded the Microsoft Northwind sample and it act the same. works fine on my machine but not on the other tablet. Am I missing any thing here? here is the exception, it's casting exception and Access denied exception: Unable to cast COM object of type 'NorthwindRT.DAL.FileWatcher' to interface type 'NorthwindRT.DAL.IFileWatcherClass'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{23F40340-AEB1-5774-5705-64488C9BDD3A}' failed due to the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). but I did on the tablet the same things I did on the developing machine! I moved the required files to the correct directory and enabled read/execute to all applications and I registered the proxy using regsvr32. Also the user can access the directory where the implementation dll is located so Access is denied exception is weird. I did my research about brokered comp and I am doing exactly like the available documentations! Any Ideas? Am I missing anything here? Is there extra settings I need to do? is my system missing any required dlls?
-
Finally could you solve this? – Fran_gg7 May 04 '15 at 16:19
2 Answers
The App does not have access to msvcr120d.dll add "ALL APPLICATION PACKAGES" to this dll and it will solve the issue.

- 31
- 5
I am also working on brokered component, so far I did had some success in development as well as deployment.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
You need to run icacls in the folder where you have the proxystub.dll and the winmd implementation.
icacls . /T /grant "ALL APPLICATION PACKAGES":RX
Now if you're deploying to a device that does not have a dev environment (i.e. Visual studio), you need to install Visual C++ Redistributable for Visual Studio 2015 (you can use whatever VS version you have, it just happend that i am using VS2015). You can download it here. And one more thing, since you don't have a development environment in the device, you would like to deploy Release assemblies not Debug so that the assemblies won't be referencing libraries or dll that is for debug (i.e. msvcr120.dll instead of msvcr120d.dll) because it won't be found in a clean device.
Lastly, I have a blog about brokered component. You might want to check it out.

- 2,774
- 4
- 37
- 57