Cross domain issues with Office Online server 2016

Recently while provisioning a huge SharePoint 2016 farm (around 70 server) on MS-Azure with 3 Office Online servers, I came across some cross domain issues with Office Online.

We had provisioned all the four environments (development, test, pre-prod and production) on Azure but on two different domains and here come the real complexity 🙂

Environment Domain URL
Development PPAD http://sharepointsite-dev
Test PPAD http://sharepointsite-test
Pre-Production AD http://sharepointsite-preprod
Production AD http://sharepointsite

The users who would be accessing the site were using laptops which were on the AD domain; for example, AD\anandsharma being their account ID.

Accessing the development and test URL’s with such devices required appending the domain name after the SharePoint site url to resolve the DNS. For example: http://sharepointsite-dev.ppad

Now while setting up Office Online servers in such cases has a big caveat!!

So let’s say my Office Online server’s load balancer (as in our case) has the internal URL as http://sharepointsite-dev-oos and everything is configured according the the following technet article – https://technet.microsoft.com/en-us/library/jj219455(v=office.16).aspx

In such a scenario, the cross domain dns resolving will not work.

Hence while configuring the Office online server, you must append the domain name to the internal url property when configuring the new farm.

Configuration on the Office Online Server (Development)

Import-Module -Name OfficeWebApps
New-OfficeWebAppsFarm -InternalURL "http://sharepointsite-dev-oos.ppad" -AllowHttp -EditingEnabled
Set-OfficeWebAppsFarm -AllowHttpSecureStoreConnections:$true

Configuration on the SharePoint Web Front End (Development)

Add-PSSnapin Microsoft.SharePoint.Powershell
New-SPWOPIBinding -ServerName "sharepointsite-dev-oos.ppad" -AllowHTTP
Set-SPWOPIZone -zone "internal-http"
$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.Update()
$Farm = Get-SPFarm
$Farm.Properties.Add("WopiLegacySoapSupport", "http://sharepointsite-dev-oos.ppad/x/_vti_bin/ExcelServiceInternal.asmx");
$Farm.Update();

Hope this helps anyone struggling with cross domain configurations.

The tool was unable to install Application Server role. Web Server (IIS) role

While installing SharePoint 2013 onto Server 2012, I came across an error as “The tool was unable to install Application Server role. Web Server (IIS) role”. After browsing internet for resolution, I finally could resolve my issue. But while doing my investigation into the error, I came across posts where different people have tried different things to resolve the same error. I will try to collate those and post it in one single post.



Option 1 :
Go to Server Manager and click on Add Roles and Features
Select and expand Web Server (IIS) Role 
Select the IIS 6 Scripting tools under Management Tools within Web Server role
Click Nextuntil the wizard finishes
Rerun the Pre-requisite setup and see if you have been able to resolve the error.

Option 2: (only for Windows 2008 R2)
Go to command prompt and run this command:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i –enable

Option 3:
Run powershell with admin priviledges
Run the following commands: (I mounted my Server 2012 ISO on D drive)

Import-Module ServerManager
Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45

Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer -Source D:\Sources\sxs