locked
SmsDevice.GetDefaultAsync() caught error 0x80070005

    Question

  • when i 

     try
     {
            device = await SmsDevice.GetDefaultAsync();
     }
      catch (Exception ex)
     { if (ex.HResult == -2147024891)  //0x80070005    E_ACCESSDENIED

         errorhandler();

    }

    i'd like to know what will cause the 0X80070005 error? when i turn off the text  messages permmissions in the setting charm. It will cause this error.

    but when the sim card is inserted, and the number is detected to be null in the pc settings, it will also cause this error.

    how am i suppose to catch the two errors in different ways?

    or how to detect the setting permmission is off instead of using smsDevice.GetDefaultAsync()?

    how to detect the the sim card number is null(sim card is installed in the device but the number is null ) 

    Monday, September 24, 2012 2:39 PM

Answers

All replies

  • Have you enabled test signing on the system?

    Best Wishes - Eric

    Tuesday, September 25, 2012 2:03 AM
    Moderator
  • hi Eric 

    how to enable the test signing on the system? Is there any link? 

    thx

    Tuesday, September 25, 2012 6:03 AM
  • yes i enabled the test signing by using this command: 

    bcdedit.exe -set TESTSIGNING ON

     but still got 0x80070005 access denied error

    Tuesday, September 25, 2012 6:10 AM
  • Did you reboot the machine after enabling test signing?
    Tuesday, September 25, 2012 4:25 PM
    Moderator
  • This functionality is only available to mobile operator apps and Windows Store apps given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: Windows Store device apps.

    Best Wishes - Eric

    Tuesday, September 25, 2012 8:32 PM
    Moderator
  • Yes you save my day!

    i rebooted the device and the error disappeared and the windows popup alert "allow user to send and receive msg?"

    so basically i installed my store package but i didn't sign the package.

    Do i need to sign the package instead of enabling the bcdedit TESTSIGNING ? 

    Wednesday, September 26, 2012 10:31 AM
  • Great News!  When you submit to the store it will be signed...

    Wednesday, September 26, 2012 5:12 PM
    Moderator