我們可以通過Office Web Apps(OWA)來實現在線編輯Word,Excel,power point, one note,并集成到自己的網站里去。
安裝了帶 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)。
需要二臺服務器,一臺做域控,另一臺安裝OWA。
1號坑:注意域控上安裝OWA是不起作用的
詳情請參考官方文檔:https://technet.microsoft.com/zh-cn/library/jj219435#software
Windows Server 2012之搭建域控制器DC
首先把DNS指向域控:
然后,開始加域:
如果加域時出現下面的錯誤:
The domain join cannot be completed because the SID of the domain you attempted to join was identical to the SID of this machine
解決辦法如下:
1. 打開command
2. 改變路徑 %WINDIR%/system32/sysprep
3. 運行sysprep /oobe /generalize
這時,就會出現下面的界面,完成后,會重新啟動。注意這里可能會把ip會清掉。
參考《Office Web Apps安裝部署(一)》
運行 /op/generate.aspx">/op/generate.aspx">/op/generate.aspx">http://<ServerName>/op/generate.aspx , 輸入文件名,然后生成link,測試在線看的功能:
下載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
在線那些事
新聞熱點
疑難解答