让自己的网站实现在线编辑office文档

我们可以通过Office Web Apps(OWA)来实现在线编辑word,excel,power point, one note,并集成到自己的网站里去。

 

1 准备工作

1.1 操作系统

  • 安装了带 Windows Server 2008 R2 x64 Edition 更新程序的 Windows Server 2008 R2 Service Pack 1 (SP1) Standard、Enterprise 或 Datacenter 的 64 位版本

  • Windows Server 2012 Standard 或 Datacenter 的 64 位版本

  • 64 位版本的 Windows Server 2012 R2。若要使用此操作系统,则必须使用 Office Web Apps Server Service Pack 1 (SP1)。

image

1.2 域要求

需要二台服务器,一台做域控,另一台安装OWA。

1号坑:注意域控上安装OWA是不起作用的

 

详情请参考官方文档:https://technet.microsoft.com/zh-cn/library/jj219435#software

 

2 创建域控

Windows Server 2012之搭建域控制器DC

 

3 加域

 

3.1 加域方法

首先把DNS指向域控:

image

 

 

然后,开始加域:

image

 

3.2 错误处理

如果加域时出现下面的错误:

The domain join cannot be completed because the SID of the domain you attempted to join was identical to the SID of this machine

image

解决办法如下:

1. 打开command

2. 改变路径 %WINDIR%\system32\sysprep

3.  运行sysprep /oobe /generalize

这时,就会出现下面的界面,完成后,会重新启动。注意这里可能会把ip会清掉。

image

 

 

4 安装OWA

参考《Office Web Apps安装部署(一)

5 测试

5.1 测试view

运行 /op/generate.aspx">/op/generate.aspx">/op/generate.aspx">http://<ServerName>/op/generate.aspx , 输入文件名,然后生成link,测试在线看的功能:

image

 

5.2 测试edit

下载demo:https://code.msdn.microsoft.com/Building-an-Office-Web-f98650d6

修改下面配置内容 :

<add key="appWopiServer"        value="http://youda.hpe.com:81/api/wopi/files/" />

发布之后,就可以测试了:《Asp.net与office web apps的整合》。

 

2号坑: 我先尝试用localhost,外部的文件path,都没成功,后面发布到网站上,用这个网站里面的文档就成功了。

3号坑:这个demo里word的edit功能还没实现。

 

官方技术文档:  https://wopi.readthedocs.org/en/latest/intro.html

 

 

在线那些事

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值