Sunday, January 4, 2015

How to publish our provider hosted app on SharePoint Online(O365)


Requirements:



Prepare your Visual Studio Solution
First of all, open the SharePoint app solution in your visual Studio. In the solution you will have almost two projects. A SharePoint project for the SharePoint side and a web project for the Remote web.
You will need to create a profile for the remote web in order to deploy to an existing IIS. In my case I published it on azure IIS but you can do the same with your local IIS.
SharePoint Online
Once you have that, you can publish the remote web.

Inside the remote web you should check:
The web.config file
There are two keys that you should have inside <Appsettings> tag:
  • ClientId
  • ClientSecret
You have to keep these values because you will use them in order to link with the app in the SharePoint side. I usually copy them to a notepad window.

SharePoint Online

Now click right button over the SharePoint Project and select Publish.

SharePoint Online

Here you will see that you have to complete the deployment profile. Click on Edit.
SharePoint Online

At this point, you have to introduce the SAME values that you had in the web.config
SharePoint Online

Now we are ready to build the app. Click on “package the app”.
SharePoint Online
SharePoint Online
Here you have to introduce the same Client ID that you had on the web.config and click Finish.
Now an explorer window will be opened. Where you can localize the <app name>.app. This file will be uploaded to SharePoint online manually.
SharePoint Online
Register the app
Now let’s open a browser and let’s go to the SharePoint online site. We can upload the app to the app catalog but in development period is easier register the app manually.
Before upload the app to SharePoint online. You need to register the app using this page:
https://<your SharePoint online URL>/_layouts/appregnew.aspx


Once you register the app (creates internally a registration inside SharePoint) now you will be able to add the app to your site.




You should trust the app clicking “Trust it” button and after few seconds your app will be installed in your SP web.



Now if click on the app you will be redirected to your remote web.


SharePoint REST APIs

https://www.tutorialspoint.com/sharepoint/sharepoint_rest_apis.htm

Server Error in '/' Application when activating "Nintex Forms" web app feature.

Apparently "INSTALL-NFService" need to be run in SharePoint PowerShell to fix this problem.   When I installed Nintex Forms agai...