deploying ajax document viewer on iis

Upload: a1448161

Post on 14-Apr-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    1/24

    DeployingAJ AX Document Viewer

    Professional Edition on I I S

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    2/24

    2

    Published Jan 2009Adeptol LLC believes the information in this publication is accurate as of its publication date. The information is subject tochange without notice.THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS IS. WE MAKES NO REPRESENTATIONS

    OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLYDISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.Use, copying, and distribution of any software described in this publication requires an applicable software license.For the most up to date listing of product names, see WWW.AJAXDOCUMENTVIEWER.COM.

    All other trademarks used herein are the property of their respective owners.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    3/24

    3

    Preface

    This document describes how to integrate and use AJAX Document Viewer with your application.

    I ntended AudienceThe audience of this manual is intended to be developers who are familiar with Java, Java Script,& overall Windows OS.

    Revision HistoryThe following changes have been made to this document.

    Revision History Revision Date Description

    Jan 09 Initial Draft

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    4/24

    4

    Table of Contents

    PREFACE ......................................................................................................................... 3

    I NTENDED AUDI ENCE .................................................................................................... 3

    REVI SI ON HI STORY ....................................................................................................... 3

    TABLE OF CONTENTS ...................................................................................................... 4

    CHAPTER 1...................................................................................................................... 5

    OVERVI EW ...................................................................................................................... 5

    I NTRODUCTI ON.............................................................................................................. 5

    SPECI FI CATI ONS SERVER .............................................................................................. 6

    SUPPORTED OPERATION SYSTEMS ........................................................................................................... 6SYSTEM REQUIREMENTS ......................................................................................................................... 6

    SPECI FI CATI ONS CLI ENT ............................................................................................... 6

    CHAPTER 2...................................................................................................................... 7

    DEPLOYI NG ON I I S ........................................................................................................ 7

    CHAPTER 3.................................................................................................................... 17

    TROUBLESHOOTING & COMMON ERRORS ................................................................... 17

    1)INPUT OUTPUT PAGE LOAD ERROR.................................................................................................. 172)INPUT OUTPUT PAGE CONVERSION ERROR...................................................................................... 193)DOCUMENT LOADS IN LOCALHOST BUT NOT FROM OTHER MACHINE.................................................. 234)SAMPLE.DOC IS ONLY LOADING EACH TIME IN VIEWER..................................................................... 24

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    5/24

    5

    Chapter 1

    Overview

    I ntroduction

    Ajax Document Viewer is a web based online document viewer and can embedded into any webpage or linked from any page. It is fast and customizable.

    For most companies, getting software products to market on time, on budget, and with the rightfeatures and functionality is always a challenge. But it doesn't have to be.

    Ajax Document Viewer lets you easily convert any document (Microsoft Word, or Excel, orPowerPoint document) to an Adobe Flash file (file with SWF extension). This file can beshared with other users who do not have the default viewing applications installed on their

    machines. These files can also be published over the web and accessed from anywhere in theworld.

    You can view the final converted file with Adobe Flash Player across various platforms andretain the formatting, graphics, fonts, special characters, and colors of source documents,regardless of the application used to create the document.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    6/24

    6

    Chapter 1 Overview

    Specifications Server

    Supported Operation SystemsThe operating systems listed here have been tested with AJAX Document Viewer Server and areofficially supported:

    Windows Server 2008 (32 bit)Windows Vista (32 bit)Windows XPWindows 2003Windows 2000Red Hat Enterprise Linux 4.6Red Hat Enterprise Linux 5.1SUSE Linux Enterprise Server 10 SP1

    System Requirements512 MB RAM (1024 MB for Vista)450 MB of free disk spaceInternet Explorer 5+ or Mozilla Firefox 2+Adobe Flash 9.0Java SE Runtime Environment (build 1.6.0_05-b13)

    Specifications Client

    Any JavaScript enabled modern browser with minimum Adobe Flash 9.0 Plugin installed.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    7/24

    7

    Chapter 2

    Deploying on I I S

    1) Install AJAXDocumentViewer as specified in the Install GuideThis document assumes you have installed AJAXDocumentViewer at locationC:\AJAXDocumentViewer

    2) Create a directory under C drive named ProjectDirectory will look like C:\Project

    3) Copy the asp sample code from C:\AJAXDocumentViewer to C:\ProjectIf you are setting up .net code then unzip the files and copy the files into C:\Project

    4) If installing on Windows Server, create a new Application Pool

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    8/24

    8

    Chapter 2 Deploying On IIS

    5) Use the default settings for Application Pool

    6) Create a new Website or Virtual Directory in IIS and point to C:\Project as shownbelow. Make sure you give Read & Execute permissions while creating the site.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    9/24

    9

    Chapter 2 Deploying On IIS

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    10/24

    10

    Chapter 2 Deploying On IIS

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    11/24

    11

    Chapter 2 Deploying On IIS

    7) Go to Properties of AJAXDocumentViewer site and assign ADV as ApplicationPool

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    12/24

    12

    Chapter 2 Deploying On IIS

    8) Make sure that Execute Permissions is set as Scripts and Executables for thecreated site.

    9) Right click on convertdocument.asp (convertdocument.aspx if you are deploying.net code), click on File Security and under Authentication Methods, enter Administrator

    username and password & click ok. You will be asked to verify the password.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    13/24

    13

    Chapter 2 Deploying On IIS

    10) Start the AJAXDocumentViewer Website in IIS and right click on index.asp (orindex.aspx in .net code) and click on Browse. You should see the Viewer with errorbelow

    11) Note the path in browser window. The path to index.aspIt should be something like http://localhost/index.asp if you have installed at default 80port .

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    14/24

    14

    Chapter 2 Deploying On IIS

    12) Go to C:\Project and open settings.xml file in notepad. You will find the xml fileas below

    http://localhost/AJAXDocumentViewer/http://localhost/AJAXDocumentViewer/convertdocument.asp

    Update the settings.xml to reflect your environment values

    Change tempLocation to C:\Project\Note - tempLocationURL & conversionFileURL should have point to same domain as

    your index.asp (or index.aspx in .net code) above. If you set up site to run at different

    port and under different name, then make sure that tempLocationURL &conversionFileURL also reflect the same.

    http://localhost/http://localhost/convertdocument.asp

    13) Open index.asp or index.aspx in an editor or Visual Studio. Update & ensurefollowing variables are correct.

    '**Location where document is located. This could be your directory where documents are located or you candynamically pass it each time**

    documentLocation = "C:\Project\"Session("documentLocation") = documentLocation

    '**Location where AJAX Document Viewer was installed.installLocation = "C:\AJAXDocumentViewer\"

    14) Go to C:\Project in Explorer Mode now and give Project directory writepermissions. You can also Guests user and give it full rights. This is the directory whereswf files will be generated and needs write permissions. In production environment, you

    might want to create a separate temp directory/location to keep swf files.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    15/24

    15

    Chapter 2 Deploying On IIS

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    16/24

    16

    Chapter 2 Deploying On IIS

    15) Browse to index.asp again and you should see the document in viewer.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    17/24

    17

    Chapter 3

    Troubleshooting & Common Errors

    1) Input Output Page Load Error

    The above error could occur due to following reasons:

    a) This could mean your default application pool does not have the permission to execute

    the convertdocument.asp or convertdocument.aspx.Click on the Application Pool that you created and are using for AJAXDocumentViewersite (ADV in this case) and right click on it to go to properties. Go to Identity and click

    on option Configurable and enter Administrator username & password.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    18/24

    18

    Chapter 3 Troubleshooting & Common Errors

    Restart IIS and Recycle the Application Pool and try index.asp again in new browser

    window.

    b) Ensure your settings.xml has correct path to the convertdocument.asp orconvertdocument.aspx. The conversionFileURL & tempLocationURL path domain should be same as thedomain for index.asp

    For example: If you are calling index.asp as http://localhost/index.asp your settings.xml will look like below

    http://localhost/

    http://localhost/convertdocument.asp

    If you are calling index.asp as http://ajaxdocumentviewer:9090/index.asp your settings.xml will look like below

    http://ajaxdocumentviewer:9090/http://ajaxdocumentviewer:9090/convertdocument.asp

    If you are calling index.asp as http://servername:9090/project/index.asp your settings.xml will look like below

    http://servername:9090/project/http://servername:9090/project/convertdocument.asp

    c) Vista Installation Make sure you are installed as true administrator on Vista OS.

    Unlike previous versions of Windows, there are differences in Vista between accountswith "computer administrator" privileges and the Administrator account. For instance, the

    Administrator account does not have User Account Control enabled.

    You won't find the Administrator account in the User Accounts Control Panel. But theMMC-based Computer Management section of the Administrative Tools Control Panel

    does give you access to the Administrator account. By default, the account is disabled,but you can enable it there. Your obvious conclusion might be that all you need to do is

    enable the Administrator account, restart Windows and then log into the Administratoraccount. But that doesn't work. There's an added step that Microsoft hasn't documented

    and that isn't all that intuitive: Not only do you have to enable the Administrator account,you also have to disable all other accounts with computer-administrator privileges.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    19/24

    19

    Chapter 3 Troubleshooting & Common Errors

    2) Input Output Page Conversion Error

    The above error document conversion is not happening to swf file. This could happen dueto following reasons

    a) Check AJAXDocumentViewer service is running in Services under ControlPanel.

    Also go to AJAXDocumentViewer\logs or \logs directory and open

    proxyserver.log file. In it towards end you will see

    ========================================INFO | jvm 1 | 2009/03/19 16:49:11 |

    INFO | jvm 1 | 2009/03/19 16:49:11 | Convert2SWF Proxy Daemon StartedINFO | jvm 1 | 2009/03/19 16:49:11 |

    INFO | jvm 1 | 2009/03/19 16:49:11 |========================================

    If you do not see the above line in log, that means Convert2SWF Proxy service is notfully started.

    To fix this, go to Services from Control Panel and right click on service to reachProperties. Click on Log On under Properties. By default the service runs under Local

    System account. If service is not starting under this account, change the account toAdministrator user account of the machine and start service.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    20/24

    20

    Chapter 3 Troubleshooting & Common Errors

    b) Make sure that converdocument.asp or convertdocument.aspx has Administratoruser account privileges in IIS.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    21/24

    21

    Chapter 3 Troubleshooting & Common Errors

    c)

    Make sure that tempLocation directory (C:\Project in this case) has writepermissions to users and IIS User.

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    22/24

    22

    Chapter 3 Troubleshooting & Common Errors

    d) Ensure your settings.xml has correct path to the convertdocument.asp orconvertdocument.aspx. The conversionFileURL & tempLocationURL path domain should be sameas the domain for index.asp

    For example: If you are calling index.asp as http://localhost/index.asp your settings.xml will look like below

    http://localhost/http://localhost/convertdocument.asp

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    23/24

    23

    Chapter 3 Troubleshooting & Common Errors

    If you are calling index.asp as http://ajaxdocumentviewer:9090/index.asp your settings.xml will look like below

    http://ajaxdocumentviewer:9090/

    http://ajaxdocumentviewer:9090/convertdocument.asp

    If you are calling index.asp as http://servername:9090/project/index.asp your settings.xml will look like below

    http://servername:9090/project/http://servername:9090/project/convertdocument.asp

    3) Document loads in localhost but not from other machine

    Ensure your settings.xml has correct path to the convertdocument.asp or

    convertdocument.aspx. The conversionFileURL & tempLocationURL path domain should be same as thedomain for index.asp

    For example: If you are calling index.asp as http://localhost/index.asp your settings.xml will look like below

    http://localhost/http://localhost/convertdocument.asp

    If you are calling index.asp as http://ajaxdocumentviewer:9090/index.asp your settings.xml will look like belowhttp://ajaxdocumentviewer:9090/http://ajaxdocumentviewer:9090/convertdocument.asp

    If you are calling index.asp as http://servername:9090/project/index.asp your settings.xml will look like below

    http://servername:9090/project/http://servername:9090/project/convertdocument.asp

  • 7/29/2019 Deploying AJAX Document Viewer on IIS

    24/24

    Chapter 3 Troubleshooting & Common Errors

    4) Sample.doc is only loading each time in Viewer

    Go to index.asp or index.aspx and comment linedocument = "Sample.doc"and uncomment line

    'document=request.querystring("document")

    Now you can give document name through querystring. Note- This assumes yourdocuments are under your specified documentLocation (C:\Project\ in this case). For

    dynamic location of documents, you can pass the full path in query string or pass it insession variable from calling page.