Error setting Setting Excel Services Trusted File Location on the second app server

Jul 24, 2012 at 10:36 PM

When I run the following code on a 2nd app server using the AutoSPINstaller, It looks like the script doesn't check when you run the same script on teh second App server. Please advise. 

Config:

<ExcelService Provision="SHPAPP1 SHPAPP2"
                      Name="Excel Web App"
                      ProxyName="Excel Web App"
                      UnattendedIDUser="DOAMIN\SP_EXCEL"
                      UnattendedIDPassword="XXXXXXXXX">
        </ExcelService>
AutoSpINstaller Code:
 
#Region Create Office Web Apps
Function CreateExcelOWAServiceApp ([xml]$xmlinput)
{
	$ServiceConfig = $xmlinput.Configuration.OfficeWebApps.ExcelService
	If ((ShouldIProvision($ServiceConfig) -eq $true) -and (Test-Path "$env:CommonProgramFiles\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\OfficeWebApps\feature.xml"))
	{
		WriteLine
		$PortalWebApp = $xmlinput.Configuration.WebApplications.WebApplication | Where {$_.Type -eq "Portal"}
		$PortalURL = $PortalWebApp.URL
		$PortalPort = $PortalWebApp.Port
		$ServiceInstanceType = "Microsoft.Office.Excel.Server.MossHost.ExcelServerWebServiceInstance"
		CreateBasicServiceApplication -ServiceConfig $ServiceConfig `
									  -ServiceInstanceType $ServiceInstanceType `
									  -ServiceName $ServiceConfig.Name `
									  -ServiceProxyName $ServiceConfig.ProxyName `
									  -ServiceGetCmdlet "Get-SPExcelServiceApplication" `
									  -ServiceProxyGetCmdlet "Get-SPServiceApplicationProxy" `
									  -ServiceNewCmdlet "New-SPExcelServiceApplication -Default" `
									  -ServiceProxyNewCmdlet "New-SPExcelServiceApplicationProxy" # Fake cmdlet (and not needed for Excel Services), but the CreateBasicServiceApplication function expects something
									  
		If (Get-SPExcelServiceApplication)
		{
			Write-Host -ForegroundColor White " - Setting Excel Services Trusted File Location..."
			Set-SPExcelFileLocation -Identity "http://" -LocationType SharePoint -IncludeChildren -Address $PortalURL`:$PortalPort -ExcelServiceApplication $($ServiceConfig.Name) -ExternalDataAllowed 2 -WorkbookSizeMax 10
		}
		WriteLine
	}
}
I get the following error
 
- Setting Excel Services Trusted File Location...
Set-SPExcelFileLocation : Cannot find object http://.
At D:\SP2010\AutoSPInstaller\AutoSPInstallerFunctions.ps1:3788 char:27
+             Set-SPExcelFileLocation <<<<  -Identity "http://" -LocationType S
harePoint -IncludeChildren -Address $PortalURL`:$PortalPort -ExcelServiceApplic
ation $($ServiceConfig.Name) -ExternalDataAllowed 2 -WorkbookSizeMax 10
    + CategoryInfo          : InvalidData: (Microsoft.Offic...celFileLocation: 
   SetSPExcelFileLocation) [Set-SPExcelFileLocation], ExcelServerObjectNotFou  
  ndException
    + FullyQualifiedErrorId : Microsoft.Office.Excel.Server.Cmdlet.SetSPExcelF 
   ileLocation
Jul 26, 2012 at 10:50 AM

from my experience you can safely ignore the message. The script will continue as normal. The script is just missing a check wheter a trusted file location with the given url already exists.

Stefan

Jun 30, 2013 at 8:22 PM
Edited Jun 30, 2013 at 8:23 PM
I experienced this error also with latest version