• Office Web Apps 2013 multi servers (NLB) Installation and Deployment for SharePoint 2013 step by step guide

    This is a step by step guide on how to install Office Web Apps 2013 multi servers farm (using windows NLB and http) and how to configure it with SharePoint 2013.

    In my next post I will talk about how to configure Office Web Apps 2013 using NLB and https in multi servers deployment.

    Important: this post is assuming that all office web apps servers will run the same role which is the typical case with most of the deployments, however incase you require to route requests to a specific office web server in the farm based on http headers consider using hardware load balancer with layer 7 routing.

    Office Web Apps 2013 Architecture Overview

    Office Web Apps 2013 deployment architecture has been changed when moving to SharePoint 2013 , where Office Web Apps are no longer a service applications to be federated with SharePoint Server. Instead office web apps 2013 are now decoupled from SharePoint to allow better extensibility , manageability , maintenance and upgrade.

    Where in the new office Web Apps 2013 Architecture one single farm of Office web apps servers can serve different SharePoint farms, exchange servers , lync servers . Or even 3rd party applications.

    clip_image001

    General Guidelines and Recommended Practices before you start office web apps 2013 Installation

    • To minimize the complexity of the deployment install all office web apps roles on each server instead of distributing the roles on servers.
    • Office web Apps 2013 does not require SQL database.
    • PowerShell is used to define Office Web Apps topology, by using New-OfficeWebAppsFarm command with the master server (the first server in the farm) and by using New-OfficeWebAppsMachine command to join more machines to the farm.
    • Also PowerShell commands are used to connect the SharePoint farm to Office Web Apps farm.
    • Incase of installing updates and patches , the Office Web Apps server should be disconnected from the Office Web Apps farm then joined again after finish the patching.
    • SharePoint system account cant render office web apps (by design for security)
    • NLB Tips
      • Consider using NLB for high availability
      • Make sure to enable NLB server affinity

     

    Office Web Apps Step by Step Installation and Configuration

     

    Prerequisites

     

     

    Office Web Apps 2013 Installation Steps

    Install IIS Role

    clip_image002

    Install Ink and Handwriting Services

    clip_image003

    On Office web apps servers (not SharePoint servers) , Run the Office Web Apps Setup

    clip_image004

    clip_image005

    clip_image006

     

    Prepare Office Web Apps 2013 for NLB

    you need to create a host record for NLB and assign preserved IP

    On DNS server , start menu -- administrative tools -- DNS - expand forward lookup zones

    clip_image007

    Right click you domain

    clip_image008

    Enter a name for you NLB Network name and any desired IP , note the NLB FQDN as we are going to use it later on

    clip_image009

    On each of the Office web Apps servers , start configuring the NLB by adding NLB from features:

    clip_image010

    clip_image011

    clip_image012

    clip_image013

    clip_image014

    As you can see the first office web App node name is OfficeWebApp01, enter the name then press connect

    clip_image015

    If you have more than one network card , select the one you wish to participate in the NLB , in my case there is only one

    clip_image016

    Note: as you can see the private IP of the current network interface in 192.168.1.22 , another IP will be added which is the NLB IP after completing the NLB configuration

    Define the priority of this NLB Node and the dedicated IP address to participate then click next. ( I left the default in my case)

    clip_image017

    We need here to specify the NLB Cluster IP which should be in our case (192.168.1.25), press add

    clip_image018

    clip_image019

    Click Ok , then Next

    In this screen we will use the FQDN we created at the DNS in the first steps

    clip_image020

    You can specify many rule for restriction purposes , in my case I accepted the default which allow all ports communication with the NLB.

    clip_image021

    You can add as many nodes as you wish to the cluster in the same way by "add Host to Cluster"

    clip_image022

    To verify the NLB setup , ping the NLB name

    clip_image023

     

    Configure Office Web Apps Multi servers Farm

    Now on Office Web Server (officeWebApp01) open windows PowerShell

    Run the following command to add the first server node to the Office Web App Farm

    New-OfficeWebAppsFarm –InternalUrl “http://OfficeApps” –AllowHttp –EditingEnabled

    -InternalURL: the NLBName for the Office web Apps farm or it can be a single server name incase this is a single server installation.

    –EditingEnabled (Optional) : used to allow SharePoint documents to be edited in browser (not needed in Lync or exchange cases)

    -AllowHttp: incase to force http communication this parameter must be passed, since Office Web App uses https as default communication, so make sure to pass this parameter if you wish to use http not https.

    After executing the command , you will get the configuration info as the following:

    clip_image024

    Now open IIS and notice the creation of the new web application

    clip_image025

    To make sure you installation is correct browse to the following URL:

    http://NLBServerName/hosting/discovery/ which is in our case: http://officeApps/hosting/discovery

    You will get a the following response:

    clip_image026

     

    Configure SharePoint 2013 to bind with Office Web Apps Farm

    Configure SharePoint 2013 to have the WOPI binding with Office Web Apps Farm, in order to perform this all what you need to do is to run a couple of simple SharePoint Powershell commands on one of the SharePoint servers (not office web app servers):

    New-SPWOPIBinding –ServerName “OfficeApps” -AllowHTTP

    Where OfficeApps is the NLBName for office Web App servers farm, you can place a single server name incase you are not using NLB/Multi Server Deployment.

    Note: the following ports should be open between SharePoint and Office Web Apps Servers 80, 443, or 809

     

    Configure SharePoint to use http

    After running the above command , let us check the binding and zone, By default SharePoint is using https , to identify which binding is used http or https run the following command in the PowerShell screen

    Get-SPWOPIZone

    clip_image027

    In order to change it to http , run the following command:

    Set-SPWOPIZone –zone “internal-http”

     

    Allow Oauth for http

    One last thing using http requires to change the AllowOAuthOverHttp to True , to do so run the following PowerShell commands on one of the SharePoint servers

    $config = (Get-SPSecurityTokenServiceConfig)

    $config.AllowOAuthOverHttp = $true

    $config.Update()

    Congratulation we are done !!

    upload a word document or PowerPoint and try to open it in browser (be carful !! don’t use system account to browse office web apps documents ,this would generate an error)

    clip_image028

    Click on the document to open it in browser, note at button how request is opened by the Office Web App servers farm.

    clip_image029

     

    Add more Office Web Apps servers to the farm

    All what you have to do now for any additional office web server is to:

    • Install Office Web Apps pre requisites
    • Install office web apps
    • Join the new server to the NLB Cluster (as described above)
    • Run the following windows power shell command from a machine that is already part of the farm
    • Firewall: If the machine joining the WAC farm cannot access the HTTP 809 channel the New-OfficeWebAppsMachine will throw a “The destination is unreachable error”.

    New-OfficeWebAppsMachine –MachineToJoin ServerName

    ServerName: is the name of the master machine (the first machine you added to the farm)

     

    use the below command to make sure the new server is added to the farm

    Get-officeWebAppsFarm

     

    Remove Office Web Machine Server

    On the server you want to remove run the below command:

    Remove-OfficeWebAppsMachine

    Tip: If, for any reason, you want to disconnect SharePoint 2013 from Office Web Apps Server, use the following command example:

    Remove-SPWOPIBinding –All:$true

    http://technet.microsoft.com/en-us/library/jj219442.aspx

     

     

    References

    Plan Office Web Apps: http://technet.microsoft.com/en-us/library/jj219435.aspx#certificate

    Deploy Office Web Apps : http://technet.microsoft.com/en-us/library/jj219455.aspx

    Configure SharePoint 2013 to use Office Web Apps: http://technet.microsoft.com/en-us/library/ff431687.aspx#tshoot

    Troubleshoot office web apps : http://technet.microsoft.com/en-us/library/ff431687.aspx#tshoot

  • Error Object Reference when viewing timer job definitions in SharePoint 2013

    During configuring one of SharePoint 2013 farms we faced an issue when trying to list the timer job definitions using central administration, this is caused after a power failure in data center which may interrupted some provisioning activities , anyways when we try to navigate to job definitions page we received the error object reference is not set to an instance of an object

    image

    clip_image004

     

    Now first area to think of is to check the log file , it indicate that one of the job properties is null , to fix this issue we need to know which job definition is exactly causing the issue ! by opening SharePoint PowerShell then typing the following command which lists all job definitions in farm

    Get-SPTimerJob >allJobs.txt | Format-Wide

    The parameter AllJobs.txt is the name of the text file that you need to export the list to , it will be generated in the same folder which you executed the command at

    after examining the file and checking the job definitions I've noticed that there is one job definition with no name and no description, only the GUID for that definition is showing!

    image

     

    Getting the GUID for that job definition eb0d56e8-713f-4f08-9f80-167bb4ea59e6

    Then using SharePoint power shell to get that job definition object to delete it as follows 

    $job = Get-SPTimerJob eb0d56e8-713f-4f08-9f80-167bb4ea59e6

    $job.Delete()

    Now Issue is fixed and timer job definitions page is getting displayed in central administration

     

    image

  • InfoPath 2010 Paging (without coding)

    Introduction

    In this post I will try to show you how to implement a simple paging mechanism using InfoPath 2010. This approach is useful if you are considering a quick & fast solution to handle InfoPath Repeating Tables (or sections) that returns 100s of items without writing code behind and by following few simple steps.

     

     

    How to do it:

    In this scenario I already have an InfoPath Form that has a sample Repeating Table that returns more than 300 items. I would like to configure it to show a 100 item on each page, below are the steps:

    1- Add a new field on you Main Data Source as following:

     

     

    2- Add 2 new buttons on the form to handle Previous & Next Pages:

    3-  In the InfoPath Repeating Table (or Section) add a new column and inset a new Calculated Value Control from the Controls Ribbon. This Calculated Value will hold the Row Number of the data that you retrieve:

    4- Open the newly added Calculated Value Property and update your Data Source using the Position() XPath:

    5- Create a Rule for the Previous Page Button on Click as following:

    Rule Name: Previous Rule

    Condition: PageNumber != 1

    Action: Set Fields Value of PageNumber = PageNumber - 1

     

    6- Create a Rule for the Next Page Button on Click as following:

     

    Rule Name: Next Rule

    Condition: PageNumber <= Count(ID) / 100

    Action: Set Fields Value of PageNumber = PageNumber + 1

    Note:

    • Whenever you see the number 100 it represents the page size.
    • you can select any fields with the Count() function, in this scenario I used ID field.

     

    7- Now the Tricky Part ... you need to create 2 new Formatting Rules on the Repeating Table as following:

     

    Rule Name: Hide Rule 1

    Condition (Expression): position() >= 100 * xdXDocument:get-DOM()/my:myFields/my:PageNumber

    Check on: Hide this Control

     

     

    Rule Name: Hide Rule 2

    Condition (Expression): position() < 100 * (xdXDocument:get-DOM()/my:myFields/my:PageNumber - 1)

    Check on: Hide this Control

     

     

     

    And that all folks ... Run your form and start Paging :)

     

     

  • Office Web Apps OWA and SP 2013 - Resource not found when viewing excel files

    After installing SharePoint 2013 farm with OWA server I’ve faced an issue when viewing excel files online, and the weird thing that it happens in excel files only! Power point and word were working 100%!

    clip_image002[6]

    Going to the discovery page for OWA located on http://officewebappServer/hosting/discovery to get the URL viewer for excel, I had the same resource not found issue! While other office document related viewer URLs give some sort of icon which mean that there is something wrong in EXCEL host web site in OWA server

    clip_image003

    clip_image004[4]

    Going to IIS and checking the virtual Directory and comparing that with Other installation for OWA and checking the url for excel viewer, I found that there is a missing virtual folder called X! This X is the responsible for excel viewing.

    clip_image005[4]

    clip_image007[5]

    Just create the x on IIS site and point it into C:\Program Files\Microsoft Office Web Apps\ExcelServicesWfe

    clip_image009[4]

    X is giving the same Icon now which leads that…..

    clip_image010

    Issue is fixed Smile

    clip_image011

  • Office 365 Arabization – Part II

    In Part I we have answered the basic questions on how to have Arabic Office 365 tenant, in this article we will go through more advanced tasks in managing and administering Office 365.

    Users Bulk Import

    Creating bulk users on Office 365 can be done based on CSV file and through one of the following options:

    • Portal: when using portal to bulk import we will face the limit of 251 row per file, which means the CSV file will have the header row and 250 users, which is easy and will work fine in Arabic for small number of users.
    •  PowerShell: is the best solution when we need to create thousands of users, the biggest file that I’ve uploaded contained 100,000 users. However the challenge here is managing these users, if you will use Excel to get the list and then save as CSV (which is the typical way) then Excel limit is 65536 row (increased in Excel 2010).

    I will not cover using the portal as it is straight forward process, check this article for more details: http://onlinehelp.microsoft.com/en-us/office365-enterprises/ff637601.aspx

    Typically we will have users’ list on Excel sheet or on DB then export it to Excel or Access, at the end what we need to have is CSV file, in my experience I’ve found that CSV file with 50,000 users as one batch is good and easy to manage.

    This CSV file must be saved as Unicode so Arabic characters can be displayed.

    Before playing with the CSV file I have some best practices steps that were very useful on the Admin machine (which will be used to manage and upload users):

    • Change the language for non-Unicode programs to Arabic.
    • As per Part I of this series we will use ISE, so if you are using Windows 8 it’s already installed if not make sure that you have ISE installed.
    • The CSV file must be save as Unicode format. When saving the CSV file from Excel the format of this file is ASCI by default, which is not supporting Unicode characters so the Arabic characters are not supported. However the trick when you have Arabic as default language for non-Unicode program you open the CSV file in Notepad you can read it even if it’s ASCI (because Arabic is the default), if you try to upload that file from ISE you will get the hieroglyphic characters, the solution here is to open the file in notepad and save as in Unicode format, as the following snapshot:

    2-01

     

    The CSV file format is simple, you can you the following template or create your own template:

    USERNAME,FIRSTNAME,LASTNAME,DISPLAYNAME,TITLE,DEPARTMENT,CITY,COUNTRY,upn

    mohamed.marzouk,محمد,مرزوق,محمد مرزوق,مدير مبيعات,مبيعات,القاهرة,EGYPT,mohamed.marzouk@meamcs.com

    2-02

    The next step is to use ISE to upload the CSV file to your tenant, follow the following steps:

    1. Open ISE and connect to your tenant using the following cmdlet:

    Connect-MsolService

    2. Run the following cmdlet to import the CSV file:

    Import-Csv D:\arab-users.csv | ForEach-Object -Process {New-MsolUser -UserPrincipalName $_.upn -FirstName $_.firstname -LastName $_.lastname -Department $_.department -Title $_.title -City $_.city -Country $_.country -DisplayName $_.displayname -LicenseAssignment meamcs:ENTERPRISEPACK -UsageLocation EG} | Export-Csv -Path d:\result.csv -Encoding unicode

    Check the following snapshot:

    2-03

    Before checking the result file, let’s explain this cmdlet, this cmdlet contains 3 parts:

    • Import-Csv: this part we are importing the CSV file to the PowerShell without creating any users yet.
    • ForEach-Object: in this part we are instructing the PowerShell that for each line in the CSV file (object) we will create new user, this user will have UserPricipalName equal to the value of the “upn” column, FirstName value is equal to the “firstname” column, and so on, the name of the column is coming from $_.columnheader. It’s important also to assign license to that user by using –licenseAssignment switch (you can get this value in your tenant by running get-msolaccountsku), also we have to give value to –UsageLocation which is the location (country) of this user.
    • Export-Csv: this is the last part where we instruct the PowerShell to export the result in Unicode format so we can read the Arabic characters.

    Last step is to check the result file for two things:

    • Any errors.
    • And users’ passwords, this password by default must be changed in the first logon.

    Check the following snapshot:

    2-04

    In this article we explained how to import Arabic users with PowerShell, next part we will discuss how to manage the Arabic users.

     

    Other Parts:

    Part I: Arabic Problems

    Part II: Users Bulk Creation

    Part III: Users Bulk Modification

    Part IV: Dynamic Distribution Group