Tuesday, January 10, 2017

Converting O365 / SharePoint App to SharePoint 2013 on Premises Solution

Generally when you are developing SharePoint Provider hosted apps you can simply user SharePoint Online version to do testing and development.

But when it comes to actual deployment you may need it to deploy as SharePoint on premises solution.

You can do it by simply adding few additional configuration sections to web.config.


This is the default web.config you will have when you are working with O365, SharePoint Online Apps.

If you want to convert the same application to host in your premises as a provider hosted application. You just need few entries in your web config.


You need to specify Authorization and SSL certificate communication settings. After that you can configure your environment to host the application as High Trust SharePoint Application.



<compilation debug="true" targetFramework="4.5" />

<httpRuntime targetFramework="4.5" />


<deny users="?" />




<!-- Following values are critical to communicate app with shrepoint server -->

<add key="ClientId" value="21da123c-b1c9-4d54-9cb1-ee36b5f91304" />

<add key="ClientSigningCertificatePath" value="C:\inetpub\wwwroot\Certificates\sample.pfx" />

<add key="ClientSigningCertificatePassword" value="password" />

<add key="IssuerId" value="d250d0bc-d44e-4d8b-9e36-567817943628" />





<!--Used by app for SharePoint-->

<binding name="secureBinding">

<security mode="Transport" />





<add binding="basicHttpBinding" scheme="https" bindingConfiguration="secureBinding" />






<add name="Access-Control-Allow-Origin" value="*" />




Post a Comment