c# - A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.ni.dll -


i have windows phone 8 application running on emulator visual studio 2012 environment. implemented logic able send toast push notifications app. when comes code snippet below in mainpage constructor, receive exception outlined in subject line:

// try find channel pushchannel = httpnotificationchannel.find(channelname); 

also, information below given out exception:

access push notifications requires id_cap_push_notification defined in manifest.

what wrong or missing receive such exception. please note running vs 2012 environment under administrator account full privileges.

thanks!

in solution explorer of visual studio

  1. expand "properties" node of project.
  2. open "wmappmanifest.xml" file "properties" panel.
  3. navigate "capabilities" tab
  4. check button "id_cap_push_notification" if not checked.

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -