简体   繁体   中英

How to deploy a low-trust SharePoint app on a local web server

I want to deploy a low-trust SharePoint app, which will run in SharePoint Online, to a local web server but after hours of googling I wasn't able to find the steps that are required to make the local web server ready for this task.

Can anybody help me with this?

Thanks in advance.

Option 1

If all what you want is to test your apps in a local environment, you just need to create a Developer Site (it is just a site collection created using the developer site template). Then you can deploy your Apps directly from Visual Studio. This works for local environment and online.

SharePoint Apps development with Developer Site

Option 2

Also, in theory you can force a non-developer site collection to be able to host apps as a developer site, this is for test purpose only, I haven't tested this so I can't recommend this action but the information is here in case you want to try it.

The developer site is the intended place for app development to take place in SharePoint—it is designed specifically for app developers to install and test apps before they are released to the store. There are certain site collection templates, such as Search and Project, which are not compatible with the dev site template. This means that developers cannot test apps designed for use with those templates with the developer site alone. The sideloading feature enables development against site collections that use a different template without affecting the UI. By enabling sideloading, an admin opens the door for anyone with app install permissions to install apps that are not sourced from the app catalog or app store.

Enable app SideLoading in your non-developer site collection

Option 3

Lets say that you want to setup a production-ready environment to deploy apps locally, maybe because you want to allow test users to choose apps from your App Catalog so they can have a full experience of installing and configuring apps.

To setup a local App Catalog you need to perform some specific configurations in your server and DNS.

Here are some good resourses about this topic:

Prepare your SharePoint 2013 farm for App development and debugging

Configure an environment for apps for SharePoint 2013

Setting up your App domain for SharePoint 2013

I figured out what to do, and it's not that much actually.

If you want to deploy the remote web, which was what I mend to say, on a local web server you have to perform the following actions:

  1. Set-Up a web server using any OS
  2. Enable the web server to communicate using SSL
  3. Disclose the web server for external connections

The TokenHelper class, which is used in your low-trust app to acquire tokens from ACS, wil take care of the rest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM