Thursday, July 24, 2014

SharePoint 2010 - Adding user to a group throws error in IE 9

SharePoint 2010 - Adding user to a group throws error in IE 9

System.InvalidOperationException: Namespace prefix 'xsd' is not defined.   
 at System.Xml.Serialization.XmlSerializationReader.ToXmlQualifiedName(String value, Boolean decodeName)    
 at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDictionaryEntryArray.Read1_Object(Boolean isNullable, Boolean checkType)    
 at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDictionaryEntryArray.Read2_DictionaryEntry(Boolean checkType)    
 at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDictionaryEntryArray.Read3_ArrayOfDictionaryEntry()

Happens when you force your page to render in IE 9 and higher.

There is a detailed discussion here :

Friday, July 11, 2014

Delete office 2013 document cache

Using office 2013 with skydrive and skydrive pro I was getting the following error.

An error occurred while accessing the Office Document Cache.

a quick startup/shutdown script was created to fix this.

cd "C:\Users\\AppData\Local\Microsoft\Office\15.0"
rd OfficeFileCache /s

echo "delete successful"

Add to startup and shutdown scripts by opening gpedit.msc

Thursday, July 10, 2014

SharePoint managed metadata fields not editable after restore

Here is a script to to fix term store ID's in metadata fields  for lists in a website when it has been restored from  another farm with the same taxonomy structure and terms.

Click here to download the script

SharePoint managed metadata fields not editable after restore

Tuesday, July 1, 2014

OWA not working after security update

Office web apps for SharePoint 2013 not working after security updates / server patching.

After installation of the following security patches, OWA stopped working there by causing issues with SharePoint 2013.

Details of ULS logs are provided below.

FarmStateReplicator.exe (0x0CD8)
Office Web Apps
Farm State

Error when trying to connect to Farm State Manager service: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http:///farmstatemanager/FarmStateManager.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() --- End of inner exception stack trace --- Server stack trace: at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Office.Web.Apps.Environment.WacServer.IFarmStateManagerService.GetAllSettings(DateTime lastGetTime, Guid correlationId) at Microsoft.Office.Web.Apps.Environment.WacServer.RemoteFarmSettings.Refresh() at Microsoft.Office.Web.Apps.Environment.WacServer.ACacheableFarmStateObject.Sync(Boolean force) at Microsoft.Office.Web.Apps.Environment.WacServer.AFarmSettings.get_MasterMachineName() at Microsoft.Office.Web.Apps.Environment.WacServer.RemoteFarmState.get_IsMaster() at Microsoft.Office.Web.WacServer.FarmStateReplicator.Replicate()

Understood that the following security updates were installed in the server

LinkDescriptionHotFixID UpdateKB2898865 UpdateKB2898866 UpdateKB2901119 UpdateKB2901120 UpdateKB2904659 UpdateKB2909210 UpdateKB2912390 UpdateKB2916036 UpdateKB2925418 UpdateKB2930275

The OWA server event logs have the following errors.

Service cannot be started. System.InvalidOperationException: The certificate has not been specified.
   at Microsoft.Web.Administration.SiteCollection.Add(String name, String bindingInformation, String physicalPath, Byte[] certificateHash)
   at Microsoft.Office.Web.Environment.WacServer.IisProvisioningUtil.ProvisionNewSite(ServerManager serverManager, String name, String physicalPath, String applicationPoolName, List`1 bindings)
   at Microsoft.Office.Web.Environment.WacServer.AgentManager.AgentController.ProvisionTopLevelSites(IEnumerable`1 webAgentsToRun)
   at Microsoft.Office.Web.Environment.WacServer.AgentManager.AgentController.StartAgents()
   at Microsoft.Office.Web.Environment.WacServer.AgentManager.AgentManagerApplication.OnStart(String[] args)
   at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

trying to query the webapps machine returns the below error.


Get-OfficeWebAppsMachine : It does not appear that this machine is part of an Office Web Apps Server farm.
At line:1 char:1
+ Get-OfficeWebAppsMachine
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-OfficeWebAppsMachine], InvalidOperationException
    + FullyQualifiedErrorId : NotJoinedToFarm.AgentManagerNotRunning,Microsoft.Office.Web.Apps.Administration.GetMachineCommand


Get-OfficeWebAppsFarm : It does not appear that this machine is part of an Office Web Apps Server farm.
At line:1 char:1
+ Get-OfficeWebAppsFarm
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-OfficeWebAppsFarm], InvalidOperationException
    + FullyQualifiedErrorId : NotJoinedToFarm.AgentManagerNotRunning,Microsoft.Office.Web.Apps.Administration.GetFarmCommand

Restart-Service WACSM

WARNING: Waiting for service 'Office Web Apps (WACSM)' to start...
WARNING: Waiting for service 'Office Web Apps (WACSM)' to start...
Restart-Service : Failed to start service 'Office Web Apps (WACSM)'.
At line:1 char:1
+ Restart-Service WACSM
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Restart-Service], ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.RestartServiceCommand

tried  the below with no result.

dism /online /enable-feature /featurename:IIS-ASPNET45
#reference :



Did not work

Finally for the solution

On OWA server:

New-OfficeWebAppsFarm -InternalUrl "" -ExternalUrl "" -CertificateName "OfficeWebApps Certificate" -EditingEnabled

To verify that the farm was created successfully, navigate to:

On SharePoint 2013
# Point PROD to PROD OWA server
Remove-SPWOPIBinding -All:$true
New-SPWOPIBinding -ServerName _owaservername_
#Set-SPWOPIZone -zone "external-https"
Get-SPWOPIZone | Get-SPWOPIBinding

Thankfully did not have to reinstall as mentioned in the article

Quoted below:
Applying Office Web Apps Server updates by using the automatic updates process isn’t supported with Office Web Apps Server. This is because updates to an Office Web Apps Server must be applied in a specific way, as described in this article. If Office Web Apps Server updates are applied automatically, users may be unable to view or edit documents in Office Web Apps. If this happens, you have to rebuild your Office Web Apps Server farm. To rebuild a farm, you must remove the Office Web Apps Server from the farm by using Remove-OfficeWebAppsMachine, uninstall Office Web Apps Server by using Add or remove programs, and then reinstall Office Web Apps Server by following the steps that are described in Deploy Office Web Apps Server. After you have reinstalled, apply the update by following the steps that are described in this article.
It is important that you review the guidelines in Planning updates for Office Web Apps Server and establish an update process for the Office Web Apps Server farm.