第一个SharePoint Add-in工程
一、创建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/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)