一、创建SharePoint hosted 工程

1、创建承载SharePoint Add-in独立域

首先,确定承载的应用程序的独立域名,可以使用类似这样的域名apps.contoso.com,鉴于众多的域名,可以在DNS中添加一个泛域名解析*.contoso.com,指向SharePoint IP地址。这样所有以contoso.com结尾的域名都指向这个IP地址。Setup DNS for domain

也可以直接在host SharePoint环境添加host映射,IP 域名。例:10.2.88.38  apps.contoso.com

2、更改AppMainfest.xml权限控制,根据项目实际需要来定

3、Configure an isolated add-in domain in SharePoint

 

二、deploye SharePoint Add-in工程

注意点:

1、 deploy SharePoint host 工程不能用system account用户

2、需要给deploy add-in的user loginName添加public,db-owner及sysadmin的权限

3、

Error 1:

Error occurred in deployment step 'Install app for SharePoint': The System Account cannot perform this action.

Error 2:

The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Error 3:

Error occurred in deployment step 'Install app for SharePoint': We're sorry, we weren't able to complete the operation, please try again in a few minutes. If you see this message repeatedly, contact your administrator.

Solution:

For error 1, follow these instructions:

a. Create a new domain account DOMAIN\myApp_Admin

b. add DOMAIN\myApp_Admin to local admin group

c. add DOMAIN\myApp_Admin to Farm Administrators group

Central Admin site --> Site Settings --> People and groups

Add DOMAIN\myApp_Admin

For error 2 & 3, follow these instructions:

1. Grant DOMAIN\myApp_Admin accont a sysadmin server role on SQL server

2. Open SharePoint Power Shell and execute Add-SPShellAdmin <DOMAIN\myApp_Admin> command.

3. Grant DOMAIN\myApp_Admin a db_owner rights to web application Content database that you would like to use for debugging SharePoint 2013 app.

4. Make sure following roles are assigned for SharePoint_Config database

SharePoint_Shell_Access

SPDDataAccess

public

5. Make sure following roles are assigned for SharePoint_Content database

db_owner

5. Make sure following roles are assigned for SharePoint_AdminContent database

public

 

三,异常处理

http://www.sharepoint-journey.com/app-development-in-sharepoint.html#gallery[pageGallery]/4/

http://www.sharepoint-journey.com/app-management-sharepoint-2013.html#gallery[pageGallery]/14/

https://social.msdn.microsoft.com/Forums/vstudio/en-US/c8eb6c92-e1b2-45a9-840e-c782bdc933ec/error-occurred-in-deployment-step-install-app-for-sharepoint-were-sorry-we-werent-able-to?forum=sharepointdevelopment

第一个SharePoint Add-in工程的更多相关文章

  1. 第一次使用Android Studio时你应该知道的一切配置(二):新建一个属于自己的工程并安装Genymotion模拟器

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...

  2. Android Studio 入门级教程(二):新建一个属于自己的工程并安装Genymotion模拟器

    声明 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4392611.html [系列] Andr ...

  3. IntelliJ IDEA 15 部署Tomcat及创建一个简单的Web工程

    一.部署Tomcat 二.创建一个简单的Web工程 2.1创建一个新工程 创建一个新工程 设置JDK及选择Web Application (创建的是Web工程) 点击Next,选择工作空间,起个工程名 ...

  4. 2.1 一个简单的Web工程例子

    一个简单的Web工程例子 开发环境: Eclipse: Neon Release (4.6.0) JDK:1.8.0_92 Tomcat:8.5.9 Maven:3.3.9 1. 在Eclipse中创 ...

  5. idea破解版安装、配置jdk以及建立一个简单的maven工程

    idea破解版安装.配置jdk,配置jdk环境变量以及建立一个简单的maven工程 一.idea破解版以及配置文件下载 下载网址:https://pan.baidu.com/s/1yojA51X1RU ...

  6. 实现一个名为Person的类和它的子类Employee,Manager是Employee的子类,设计一个方法add用于涨工资,普通员工一次能涨10%,经理能涨20%。

    1.实现一个名为Person的类和它的子类Employee,Manager是Employee的子类,设计一个方法add用于涨工资,普通员工一次能涨10%,经理能涨20%.具体要求如下:(1)Perso ...

  7. 如何在服务器上新建一个svn的目录工程文件

    如何在服务器上新建一个svn的目录工程文件

  8. 一个SharePoint定时器 (SPJobDefinition)

    需要写一个自定义的sharepoint timer job, 目的是要定时到Site Collection Images这个List里检查图片的过期日期,如果即将过期的话,需要发送email到相关的人 ...

  9. Android高效的应用程序开发工具集1---ant构建一个简单的Android工程

    在java编译那些事通过提到ant编译Java工程,如今扩大到用它来构建Android目,事实上道理是相通的.变化的仅仅是使用的形式.ant构建相比IDE的优点是多个子项目使用自己定义jar包时,an ...

随机推荐

  1. 设计模式(C#)——02抽象工厂模式

    推荐阅读:  我的CSDN  我的博客园  QQ群:704621321       在工厂模式中,一个工厂只能创建一种产品,但我们往往希望,一个工厂能创建一系列产品.很明显工厂模式已经不能满足我们的需 ...

  2. Codeforces 976C

    题意略. 思路:由于题中只要让我们找出嵌套的段就行了,那么我们只需要排序一下就好了. 排序方式:按左端由小到大排,左端一样的时候,右端小的排在前. 如果你担心1会因为2的阻隔而不能嵌套3的话,那么2可 ...

  3. c++ 开发JNI

    c++ 开发JNI C的预处理命令 #开头的就是c/c++的预处理命令 在编译之前 先会走预编译阶段 预编译阶段的作用就是 把 include进来的头文件 copy到源文件中 define这些宏定义 ...

  4. Spring框架入门之Spring4.0新特性——泛型注入

    Spring框架入门之Spring4.0新特性——泛型注入 一.为了更加快捷的开发,为了更少的配置,特别是针对 Web 环境的开发,从 Spring 4.0 之后,Spring 引入了 泛型依赖注入. ...

  5. MSIL实用指南-生成break和continue

    break和continue本质都是标签的跳转

  6. Agentless监控实践中的预警指标采集

    很多公司已经开发了监控解决方案,解决了指标收集.展示.预警发送等一系列问题. 本文介绍的监控解决方案由高性能时序数据库InfluxDB.时序分析监控工具Grafana及Agentless自动化工具An ...

  7. FZU Tic-Tac-Toe -.- FZU邀请赛 FZU 2283

    Problem L Tic-Tac-Toe Accept: 94    Submit: 184Time Limit: 1000 mSec    Memory Limit : 262144 KB  Pr ...

  8. [DP]换钱的方法数

    题目三 给定数组arr, arr中所有的值都为整数且不重复.每个值代表一种面值的货币,每种面值的货币可以使用任意张,在给定一个整数aim代表要找的钱数,求换钱有多少种方法. 解法一 --暴力递归 用0 ...

  9. java解决回文数

    递归解决palindrome问题 如果String仅仅只是一个或者0个字符,则它就是palindrome 否则比较字符串第一个和最后一个字符 如果第一个和最后一个字符不同,那么就不是palindrom ...

  10. Go语言标准库之flag

    Go语言内置的flag包实现了命令行参数的解析,flag包使得开发命令行工具更为简单. os.Args 如果你只是简单的想要获取命令行参数,可以像下面的代码示例一样使用os.Args来获取命令行参数. ...