Thursday, January 2, 2014

Step by Step process to create a Provider Hosted App in SharePoint 2013

Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpufjjwhdowbdowbfowbfcoqejcjeonve
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf

Apps in Sharepoint: 

 

Basically in SharePoint, the application can be hosted by 3 types.

1. SharePoint Hosted Application.
2. Auto Hosted Application.
3. Provider Hosted Application.

Provider Hosted Application
Provider Hosted Application is very useful to re-use the existing .Net application with very minor changes and their hosting environment.

Steps to Create a Provider Hosted Application:

1. Open the Visual Studio 2012 as Administrator



2. Click New Project.



3. Select the Template App for SharePoint 2013.



4. On the Creation of the Solution, Visual Studio will ask for the Site Collection against which we are going to deploy our app. In the same screen, we need to choose the type of hosting which we are planning. In our case, it is going to be Provider Hosted Application.





5. On the selection of Provider Hosted, Click Next. The below screen will be asking the Certificate






6. The Certificate needs to be created on the SharePoint machine and pfx file needs to be exported and shared with the Visual Studio Machine.
 



7. Now, the Solution has been created. The basic solution is as follows.



8. Go to the Property of the AppWeb project and make sure that the Target Framework is set to 4.5.



9. Create the virtual directory will be helpful to host our AppWeb on the Local IIS, instead of using the IIS Express, let us host our application on the IIS itself.



10. By Clicking the “Create Virtual Directory” button on the Web Tab, virtual directory will be created on the local IIS.



11. After the property configurations, we are ready with our Provider Hosted Application. Rebuild the solution to make sure everything is fine.

12. Go to the AppManifest.xml in the App project. AppManifest file will be looking like this.



13. If you want modify the Start Page attribute to point the IIS directly.



14. Go to Permissions Tab. Add the corresponding scope and the permissions as per the requirement. In this demo, I am adding the web as full control. This will give the rights to do CRUD Operations.


 


15. The AppManifest.xml will be like this.



16. Now, we came to the final step of our provider hosted application creation. That is, we need to register our clientID with the sharepoint before deploying the app.

17. Hence, from our sharepoint site itself, go to the AppRegNew.aspx page. The page will present inside the layouts folder. The URL would be something like



18. By clicking the “Generate Button” of the App ID, ClientID can be generated.


19. Copy the GUID and we need to paste that in 2 places.



a. Web.Config File – App Settings.update the Client Id and add the app secret.





b. AppManifest.xml – App Principal, a update the Client Id,




20. After updating the ClientID, we can build and Deploy the solution. Right click the solution and click Deploy.




21. Click on Trust It. The app will get installed. We can launch the App from our SharePoint Portal.








2. Click New Project.
3. Select the Template App for SharePoint 2013.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
cool :)


 


Basically in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf
Apps in SharePoint
Basically in SharePoint, the application can be hosted by 3 types.
a. SharePoint Hosted Application.
b. Auto Hosted Application.
c. Provider Hosted Application.
- See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.AuoKOtuk.dpuf

 

in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf
in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf
in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf
in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf

 

in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf
in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf
in SharePoint, the application can be hosted by 3 types. - See more at: http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013#sthash.IiZqvpC9.dpuf