一、创建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. 【原创】Linux PSCI框架

    背景 Read the fucking source code! --By 鲁迅 A picture is worth a thousand words. --By 高尔基 说明: Kernel版本: ...

  2. jQuery实现发送验证码30s倒计时,且刷新页面时有效

    在这里讲一讲这个案例的实现思路吧(个人见解)..核心思想:为防止页面刷新时倒计时失效的解决方案是:当每次刷新一次页面时都执行一个函数 即下面讲到的 setStyle() 函数.这个函数会根据当前的 c ...

  3. MyBatis 封装Map,返回不同实体的集合对象

    现在有一个需求,就是从100个表中获得任意表中的数据,按照正常的思维模式和处理方式, 我们首先会创建100个实体类(累死!),然后通过resultType一一对应实体类,这种方式简直...  那么我们 ...

  4. hive 四种表,分区表,内部,外部表,桶表

    Hive四大表类型内部表.外部表.分区表和桶表 一.概述 总体上Hive有四种表:外部表,内部表(管理表),分区表,桶表.分别对应不同的需求.下面主要讲解各种表的适用情形.创建和加载数据方法. 二.具 ...

  5. 第10章 文档对象模型DOM 10.3 Element类型

    Element 类型用于表现 XML或 HTML元素,提供了对元素标签名.子节点及特性的访问. 要访问元素的标签名,可以使用 nodeName 属性,也可以使用 tagName 属性:这两个属性会返回 ...

  6. MSSql 保留两位小数的用法

    --MSSql 保留两位小数的用法1: round(@sum,2),2: Convert(decimal(18,2),@sum) select round(9,2)                  ...

  7. URAL-1982-Electrification Plan最小生成树或并查集

    Electrification Plan 题意:在一个无向图中,给你几个源点,找出把所有点连接到源点后最小的消费: 可以利用并查集: 先用结构体把每个边存起来,再按照消费大小排序.之后从消费小的到大的 ...

  8. CodeForces 507E Breaking Good 2维权重dij

    Breaking Good 题解:         2维权重dij, 先距离最短, 后改变最小.   在这个题中, 如果要改变最小, 则让更多的可用边放进来. 然后可以用pre存下关键边.   代码: ...

  9. [NOI2009]诗人小G 四边形优化DP

    题目传送门 f[i] = min(f[j] + val(i,j); 其中val(i,j) 满足 四边形dp策略. 代码: #include<bits/stdc++.h> using nam ...

  10. codeforces 816 E. Karen and Supermarket(树形dp)

    题目链接:http://codeforces.com/contest/816/problem/E 题意:有n件商品,每件有价格ci,优惠券di,对于i>=2,使用di的条件为:xi的优惠券需要被 ...