Online Document preview Scenario-office Web Apps

Source: Internet
Author: User
Tags domain server

Original: Online Document preview Scenario-office Web Apps

In the recent project, to implement the online document preview function on the phone side. So Baidu came up with a solution, roughly converting the document into a PDF, and then previewing it through the plugin. These scenarios do not implement code specifically, there is no online preview of the address, plus the project time is tight. can only consider other scenarios, then Microsoft's Office Web Apps solution in view, so with colleagues with a PC machine toss a few days finally completed the deployment, hope through this article record the installation process and encountered the pit. Currently using the program of the Ming DAO Microsoft, I deployed the service address: Http://myscloud.vicp.cc/op/generate.aspx The following is an online preview.

Benefits of using this scenario:

1. The amount of existing code churn is small and can be almost negligible.

2. No need to write your own code, only a single server can

3. Support document type is very comprehensive, doc,ppt,xls,docx,pptx,xlsx,pdf.

4. Mobile phone and PC support, support document cache, paging browse.

  

Read Catalogue

    • Installation Deployment Steps
    • Using the example
    • Server Deployment Troubleshooting Issues
    • Summarize
Back to top install deployment steps

After the features are described, the installation deployment of the service is described below. It may be difficult for a person to feel the initial deployment, because the service limit is still a lot.

Server environment Requirements

1. The conversion document requires two servers, one for the conversion server and one for the domain control server. (The server that installs Office Web apps must be domain-installed for the installation to succeed, and if there is an error following the steps in addition to the domain, the problem will be described in the FAQ)

2. System requirements for widow server2008r2 64bit or above, NET Framework 4.5,kb2592525,windows PowerShell 3.0,iis, ensure 80 443 809 ports are not occupied, Ensure that Office is not installed on the current machine and that the current machine is not installed Exchange,sharepoint,lync Server,sql server

3. The higher the server bandwidth and memory, the better the test finds, and the reason for this is the principle of service implementation. The Office Web Apps service downloads the document from the SRC server via the user-supplied document SRC, then converts it, caches it according to the document name, and returns after the conversion is complete. The larger the bandwidth, the less time the download process uses, the better the server performance translates faster.

  

Domain Control server Installation Here is not covered, there is a need to refer to the domain Server installation deployment this article.

Software preparation

1. The software required for the installation of this article I have placed in the Baidu cloud disk, can be downloaded. : Http://pan.baidu.com/s/1o6tCo8y#path=%252Foffice%2520web%2520apps

Steps

  The following installation steps are important, it is difficult to resolve an unknown error that is not installed sequentially, so it is recommended to follow the steps below to install it.

 1. Install. NET framework4.5

2. Installing IIS7

  Open Server Management, add roles

Here's a point, all of these functions are hooked up and will be used when you run the command later.

3. Installing patches

Windows Server R2 x64 Edition Update (KB2592525) _WINDOWS6.1-KB2592525-X64.MSU

4. Installing PowerShell

Windows6.1-kb2506143-x64.msu

5. Install ink Support

  Server management, adding features

6. Install Office Web Apps

  Website Download URL: http://download.microsoft.com/do ... D8639/wacserver.exe

  

7. Install the Office Web Apps Language Pack

Wacserverlanguagepack.exe

8. Install Office Web Apps SP1 Patch pack

9. Configure Office Web Apps with PowerShell

This step is the most error-prone, remember to use the domain account right-click Administrator mode to run

Import-module Officewebapps
New-officewebappsfarm-internalurl http://xx.domin.com  -externalurl http://xx.domin.com  -allowhttp- Editingenabled-openfromurlenabled

The use of new-officewebappsfarm and the meaning of each parameter can go to Microsoft Official website view: http://technet.microsoft.com/zh-cn/library/jj219436.aspx

-internalurl: Intranet browsing address, http://xx.domin.com where xx means the computer name domin.com represents the domain name

-externalurl: Extranet Browse Address

-allowhttp Allow 80 port access

-openfromurlenabled allows you to preview by URL

-cachelocation cache file Storage path default is C:\ProgramData\Microsoft\OfficeWebApps\Working\d

-CACHESIZEINGB Maximum cache file size Unit GB default is 15GB

about how to set the-internalurl, you can right-click the computer to view the full name of the computer is the required address

After executing the command can be viewed in IIS, you can see the automatic addition of two sites, through the above address http://xx.domin.com to browse, the following interface shows that the entire installation is complete.

If you want to modify the service configuration during use, you can modify it through the Set-officewebappsfarm command.

Set-officewebappsfarm-allowhttp

I'm done with this. After the peanut shell mapped a network address, you can access the preview (the network may be unstable). Http://myscloud.vicp.cc/op/generate.aspx

Back to top use example

After you install Office Web apps, you can implement online previews in the following ways.

// Online preview Service address var strofficeapps= "https://docview.mingdao.com"; // document address, need to be accessible by extranet var strfileurl= "Http://74881.vhost65.cloudvhost.net/doc/test.docx"; var strurl =strofficeapps+ "/op/embed.aspx/src=" +encodeuricomponent (Strfileurl);

The generated address can be previewed in the browser, and you can embed the address in the IFRAME for use

<IframeSrc= ' strURL 'Width= ' 476px 'Height= ' 288px 'Frameborder= ' 0 '>this is an embedded<Atarget= ' _blank ' href= ' http://office.com '>microsoft office</a> document, Powered by <a target= ' _blank ' href= ' Http://office.com/webapps '>office Web Apps</a;.  </iframe>              

Back to top server deployment troubleshooting issues

The following is a list of the installation of the deployment process of several problems and solutions

1.new-officewebappsfarm: Logon failure: Unknown user name or bad password

PS c:\users\administrator> New-officewebappsfarm-internalurl"http://xxxx"-allowhttp-editingenablednew-Officewebappsfarm: Logon failure: Unknown user name or bad password. Location Line:1Character:1+ New-officewebappsfarm-internalurl"http://xxxx"-allowhttp-Editinge ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Categoryinfo:notspecifi Ed: (:) [new-Officewebappsfarm], authenticationexception+FullyQualifiedErrorId:System.Security.Authentication.AuthenticationException, Microsoft.Office.Web.Apps.Adminis tration. Newfarmcommand If you encounter this problem, you may be using a local account to log in, you need to switch to the domain account operation. 

2.HTTP Error 500.21

To access http://Xxxx/hosting/discoveryHTTP Error500.21-Internal Server Error Handler "Discoveryservice" has an error module "Managedpipelinehandler" in its module list
This error occurs when the first step of installing. NET framework4.5 is not registered in IIS, and you open cmd as an administrator and run the following commandCD C:\Windows\Microsoft.NET\Framework64\v4.0.30319
. \aspnet_regiis.exe-Irumicrosoft (R) ASP. Regiis version4.0.30319.17929Management utility for Installing and uninstalling ASP. NET on the local computer. Copyright (C) Microsoft Corporation. All rights reserved. Start installing ASP .4.0.30319.17929). ............. ASP (4.0.30319.17929) installation is complete.
Iisreset/restart/Noforce is trying to stop ... Internet Service has successfully stopped trying to start ... Internet Service started successfully

Back to top of the summary

The whole program does not need to write their own code, the trouble is to install the deployment, errors are difficult to troubleshoot, mainly because of less data. So when installing to the Office Web Apps Step, use the Ghost tool to back up the system so that you don't have to start the installation from scratch.

If you have encountered strange errors during the installation process and resolved, I hope you can tell me, for my supplementary to improve the problem. At present, the program has been in the purchase of server implementation process, there is a need to implement online document preview can be considered for use.

If you think reading this blog gives you something to gain, just click on the " recommend " button in the lower right corner.
If you want to find my new blog more easily, click on " Follow me " in the green channel.
Because, my writing enthusiasm also inseparable from your affirmation support.

Thank you for your reading, if you are interested in the content of my blog, please continue to follow my following blog, I am the flame tail Diego.

Online Document preview Scenario-office Web Apps

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.