SmsDevice.GetDefaultAsync() caught error 0x80070005 RRS feed

  • Question

  • when i 

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



    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


All replies

  • Have you enabled test signing on the system?

    Best Wishes - Eric

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

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


    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
  • 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
  • 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