Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Sharepoint Development Setup on Local Server

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 11
    • 0
    • 522
    Comment on it

    This blog is useful in setting up your own Sharepoint development environment on local server.

    I am assuming that you have already installed Sharepoint 2013 into your development server and now you want to start development for Sharepoint.

    Small brief on Sharepoint app before we start setting up the development environment.

    We can create 2 kinds of Sharepoint apps in Sharepoint 2013.

    1. Sharepoint hosted app : In this app, components are hosted on Sharepoint farm.

    2. Provider hosted app : In this app, components are deployed and hosted outside the Sharepoint farm. To avoid confusion in coming steps, I want to tell you that when it comes to app development, Provider hosted app is divided into two sub-types. One is Provider-hosted app and second is Autohosted app. (Difference between two is explained below.)

    Now I will explain how to develop provider hosted app using Visual Studio 2013

    1. Create Sharepoint App in Visual Studio : Go to : File->New Project->office/Sharepoint->Apps->App for Sharepoint 2013 Provide the Sharepoint site URL from where you want to Debug Your App, you can consider this as a parent sharepoint site under which your app will be called.

    2. Sharepoint site

    3. Now you need to choose which kind of app you want to build. It gives you 3 options:

      a) Provider-hosted : Choose this app when you want to host your app outside the Sharepoint farm and you want liberty to choose any technology in building your application and not only .NET.

      b) Autohosted app : Choose this app when you want to host your app outside the Sharepoint farm and your application will only be built in .NET. You can deploy only Autohosted app onto Azure and not the Provider-hosted app.

      c) Sharepoint-hosted app : Choose this app when you want to host your app within Sharepoint farm. In this app you will only work on client side of the application using, HTML and Client Side Object Model. There will be code which will run on the server.

    4. Following steps are for Provider-hosted app

    5. Select Web project type : Select either MVC or Web Forms application. This will be your main application which will be hosted within Sharepoint site but deployed on different server.

    6. Web project type

    7. Configure authenticate settings : You need to provide certificate which you will use for your application authentication. You can assign the certificate at this stage or at later stage as well.

    8. Authentication settings

    9. Now you will see that two projects are created with default templates.

      1. First (SharepointApp1) is your App for Sharepoint
      2. Second (SharepointApp1Web) is the main application where you will do your development.
    10. Sharepoint projects

    11. Create your site in IIS : Create a folder where you will published your site from Visual Studio. Give this site the physical path to this published folder. Now, you will publish your site to this folder after every change you make in the application.

    12. Create server certificate for high trust app : You can refer for steps to create server certificate. Once, the certificate is created provide its detail in your application's web.config for ClientSigningCertificatePath, ClientSigningCertificatePassword and IssuerId.

    13. Certificate settings

    14. Next is to register your app in Sharepoint

      1. Go to /_layouts/15/appregnew.aspx
      2. Generate App id
      3. Generate App secret
      4. Give your App a title
      5. Provide the App domain & redirect URI (IIS app)
      *Note the App id and App secret for future use.

    15. Update web.config : Provide the App id and App secret that was generated in the above step to ClientId and ClientSecret respectively.

    16. Web config settings

    17. Enable basic authentication : Go to IIS->Your site->Authentication. This is required to bypass authentication required on every subsequent hit to the application.

    18. Basic authentication

    19. Open AppManifest.xml in Visual Studio and make changes for two sections:

      1. Under General settings, provide Start page of your app and in Query string section, make sure it has value as {StandardToken}.
      2.  General settings

      3. Under Permissions tab provide the Scope and Permission to your app for various section/features provided by Sharepoint.
      4. Scope permission

    20. Make changes to your application and publish it. You are ready to see your application running under Sharepoint. You need to publish your site every time you make any change in your app.

    You development environment is setup for developing high-trusted Sharepoint App.

    <b>Sharepoint Development Setup on Local Server</b>

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: