Missing Context Token in Low Trust App with SharePoint 2013 - Part 2

As I noted in my first post on this topic - https://blogs.technet.com/b/speschka/archive/2013/05/28/missing-context-token-in-low-trust-app-with-sharepoint-2013.aspx - you may find yourself in a low trust app without a context token, which basically leaves you up the creek without a paddle. I ran across another scenario where this was happening so thought I would add it to my list of app model troubleshooting tips I'm keeping here on Share-n-Dipity. In this case, I had added a AppInstalled receiver to my application, and some code within it was failing. There weren't any unhandled exceptions, but nonetheless when the page in my provider hosted app was loaded, it contained no context token.

The way I finally started narrowing this problem down was to remove the Xml for the AppInstalled receiver from the AppManifest.xml file for my application. Specifically, I commented out this:

<InstalledEventEndpoint>~remoteAppUrl/Services/AppEventReceiver.svc</InstalledEventEndpoint>

With that commented out, my page began getting the context token again. That of course then allowed me to redirect my troubleshooting efforts towards my event receiver. Overall it fits with your debugging 101 concepts of always trying to reduce scope to the smallest reproducible scenario. Just add this to the list of things to check off if you find yourself missing a context token with a low trust app.

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    January 08, 2015
    m88 : http://m88en.com
    M88.com offer online sports games Asia, Sports Betting Asia, Sports Betting Sites Asia.
    m88asia : http://m88en.net
    Link to M88BET phone: m88en.com. – Register and Open Betting Account and Membership M88BET.
    m88bet : http://www.linkm88vip.com
    MANSION88 the house is one of the largest and most prestigious. Appeared quite early in the Asian market, the so-MANSION88 currently attracts more players.
    link m88 : http://m88wiki.com
    Home the M88 is the official sponsor of the football club in the Premier League
    Wish you happy with the new M88
    m88 casino online : http://m88free.com

    Modern Thai restaurant combines outstanding traditional cuisine and a subtle modern decor with a warm welcoming ambience. Thai Restaurants in Brisbane :http://www.watersidethainoodles.com.au , traveller reviews of Brisbane Thai restaurants and search by price, location, and more..