I am able to register companion device(mobile phone) with CDF framework in Win32 application.I am not getting any exception in this case.Then i have used MakeAppx tool to convert win32 application into appx. When i tried to register companion device with CDF framework using
SecondaryAuthenticationFactorRegistrationResult registrationResult = await SecondaryAuthenticationFactorRegistration.RequestStartRegisteringDeviceAsync(deviceModelNumber,
capabilities,
deviceFriendlyName,
deviceModelNumber,
deviceKey,
authKey);
through appx, getting exception: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
I am referring the pure UWP sample for CDF framework from below link.
https://github.com/Microsoft/companion-device-framework
Also i have taken care of adding below capability to appxmanifest.xml while creating appx.
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="secondaryAuthenticationFactor" />
<Capability Name="internetClient" />
</Capabilities>
I am in trouble as appx created using makeappx tool throwing access denied exception where as win32 and sample pure UWP application working fine. Looking for the solution.