2

We have been developing SharePoint-hosted apps for SP online with great success, but seems like developing SharePoint-hosted apps for the on-premise 2013 is not so intuitive process.

Questions:

  1. As a rule of thumb, should we NOT create sharepoint-hosted apps on the on-premise?
  2. For every new deployment version, unless users go to Site Content and Trust the app, it wont appear on the with X-Frame-Option = SAME ORIGIN error. Note that all of my ClientWebParts include the AllowFraming tag. We also use plenty of the AppContextSite Lists. Isn't there any way to set my app as trusted, so that any user visiting the page hosting the AppPart, be able to see the content of my app?

    • None of this issues exist on the online version and i was wondering if the sharepoint-hosted apps are not meant to be deployed on the on-premise.

** This thread is based on another thread i raised recently, but I thought to create a new one for narrowing the problems I have! Do not down-vote for duplication ! https://sharepoint.stackexchange.com/questions/115708/sharepoint-hoted-apps-for-sharepoint-2013-x-frame-options-error

UPDATE 1: point 2 revised

In point 2 I mentioned that my app requires Trust from all users. The correct is that the app requires login from all users visiting Site Contents before they can view it on the page. Here is the revised point 2.

  1. For every new deployment version, unless users go to Site Content open the app and insert their credentials, it wont appear on the page with X-Frame-Option = SAMEORIGIN error. Note that all of my ClientWebParts include the AllowFraming tag. We also use plenty of the AppContextSite Lists. Isn't there any way to login without going to the Site Contents or event better to use the Site credentials and login directly without extra effort from the user?
2
  • So after clicking "Trust the app", you are not getting X-Frame-Option = SAME ORIGIN error?
    – Aanchal
    Commented Sep 21, 2014 at 11:40
  • @Aanchal Correct. Is there any way to Trust the app once and all users be able to visit the page with the CLientWebPart and view the content with no extra effort from users? Commented Sep 21, 2014 at 12:24

1 Answer 1

0
  1. Yes, SharePoint-hosted app can possibly be created in on-premise environment.
  2. To trust an app is meant for one time at the time of installation of an app.

What type of user is trying to visit your page containing the clientwebpart? Do the users have read permission to visit your page?

Try to first publish the app having read permission at site collection level and then upload to app catalog and install at a specific site. Then try to visit the page with another user permission. The only possible obstacle that can occur is it will require your credendials once again to visit the page where client webpart is stuck into it.

4
  • I have put it a bit wrong. It only ask me to trust my app the first time while installation. Then even if I, with my admin account access the page with the ClientWebPart i will get X-Frame error. Only if i go to Site Content and open the app from there i will get the option to add my credentials. Then if i visit the page with the AppPart again it works fine. Is there any way to have the user signed in to the app part without going to the Site Content? Commented Sep 22, 2014 at 8:36
  • That mean user is trying to access site as anonymous user because on browsing to site content, user got automatically logged in. So try to change security setting of your Internet explorer like automatically "logged in"..
    – ateet
    Commented Sep 22, 2014 at 8:43
  • No it cant be. The scenario with the users is: - Install and add the AppPart with FF using my account (admin) - Visit the page (hosting the AppPart) with Chrome (again logged in with my account) and will get the X-Frame error - In Chrome (with my acc) go to Site Content and open the app and login. - The (in Chrome) go back to the page with the AppPart and voila the AppPart appears perfectly. - Then logout and login with any other account and still the app show fine in the page, no login is needed. * Note that i have FBA and Claims authentication for all that matters. Commented Sep 22, 2014 at 8:52
  • As i am still trying to get a valuable response on my issue, can you please provide any other possible solution to my app part issue. I really cant believe that MS is encouraging us to move towards Apps instead of full trust solutions is on the on-premise version i need to ask the users to login twice. This is another post i started narrowing down the issue: link Commented Oct 16, 2014 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.