Pages

Thursday, August 28, 2014

SharePoint Hosted App - This page can't be displayed


When we deploy directly from visual studio, app will work fine. Because when deploy from visual studio, It will add host entry for an app. If upload the .app package file to SharePoint site manually, may get below issue on click of an app,


Example of host entry by visual studio on deploy,

127.0.0.1             app-e9cbfac49ea738.spdevapps.com     # 4beb64a4-83fc-474b-b6c6-d43df3f33fdf;http://sp2013/
::1                        app-e9cbfac49ea738.spdevapps.com     # 4beb64a4-83fc-474b-b6c6-d43df3f33fdf;http://sp2013/

In above example,
app-e9cbfac49ea738.spdevapps.com – App URL
4beb64a4-83fc-474b-b6c6-d43df3f33fdf – Product ID of an app, you can find this AppManifest.xml
http://sp2013/ - Host site URL where installing an app based on uploaded app package.

If get above issue (The page can't be displayed), we need to add host entry for the app manually. Use below powershell command to get app url because, app url will be changed everytime with app id.,

                            $instances = Get-SPAppInstance -Web



1 comment:

  1. SharePoint Hosted App - This page can't be displayed

    Very interesting post... Now, developers & students will easily solve this problem...

    Well, read our service

    Fitness App Development Company
    Fitness App Development Services

    ReplyDelete