Fun with Office Web Apps…

So, I’ve just spent the last 3 hours trying to get Office web apps up and running on my Laptop. Apart from the install process you have to undertake (I ran a Powershell script for the first time today to get it working) I had the most obscure errors coming up when trying to open a word document for viewing in the browser.

image

But…

When I opened the document for editing, it worked fine! So, on to the ULS logs.

First there’s this…

GetCachedItem() result: ItemNotGenerated for item docdata.xml, document F3e26fa1f23b74c8cb12ff88bfc2fff97maba24b2782f143a59be745846756a44fm1b95c0e7db8a44daa26ff8572e6532e3m

Then some of these…

ViewStore.OnReceivedItemFromBackend(F3e26fa1f23b74c8cb12ff88bfc2fff97maba24b2782f143a59be745846756a44fm1b95c0e7db8a44daa26ff8572e6532e3m, Silverlight, docdata.xml) – state ItemNotGenerated

So it looks like it’s not creating the document… or something.

Then this…

Requesting item that was not generated StackTrace:
at Microsoft.Office.Web.Common.Log.ShipAssertTag(UInt32 tag, Category category, Boolean condition, String assertMessage)
at Microsoft.Office.Web.Conversion.Viewing.Client.Librarian.OnReceivedStoredData(IAsyncResult ar)
at Microsoft.Office.Web.Common.AsyncResult`1.SetCompleted(T result, Exception e, Boolean completedSynchronously)
at Microsoft.Office.Web.Conversion.Viewing.Client.ViewItemStore.SetCompleted(ItemRetrievalInfo info, ItemRetrievalStatus status)
at Microsoft.Office.Web.Conversion.Viewing.Client.ViewItemStore.OnReceivedItemFromBackend(IAsyncResult ar)
at Microsoft.Office.Web.Common.AsyncResult`1.SetCompleted(T result, Exception e, Boolean completedSynchronously)
at Microsoft.Office.Web.Conversion.Framework.Remoting.AsyncGetItemInfo.SetCompleted(ItemCacheState cacheState)
at Microsoft.Office.Web.Conversion.Framework.Remoting.ConvertingServiceProxy.OnItemDataReceived(IAsyncResult ar)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishSend(IAsyncResult result, Boolean completedSynchronously)
at System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Security.ApplySecurityAndSendAsyncResult`1.SharedCallback(IAsyncResult result)
at System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.OnGetResponse(IAsyncResult result)
at System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.HttpWebRequest.ProcessResponse()
at System.Net.HttpWebRequest.SetResponse(CoreResponseData coreResponseData)
at System.Net.ConnectionReturnResult.SetResponses(ConnectionReturnResult returnResult)
at System.Net.Connection.ReadComplete(Int32 bytesRead, WebExceptionStatus errorStatus)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Oh yeah, I remember this issue It was back in ‘Nam and there were mosquitoes everywhere…

Anyway, this made me hit the web. Lots of good stuff there, but unfortunately nothing that was very helpful (installing this hotfix 982307, add this property to the web.config files in the Web Applications – <compilation optimizeCompilations=”true”> from here – http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx)

Some good stuff here – Install and configure Office Web Apps on an existing SharePoint server farm, here – http://technet.microsoft.com/en-us/library/ee837418.aspx – and here – http://technet.microsoft.com/en-us/library/ff431687.aspx – but the gold nugget was here as I found out later – http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/8092e5ea-b141-4075-a047-f2519eaa6a8d

I gave up and went looking in the event logs for the error – an exception like that, has to appear in the windows event log… and it did.

SQL Database ‘WSS_Content_0b7f009c-3635-4019-9c1c-f6cbdac3cfcb’ on SQL Server instance ‘ONLD630TB9MBT1S’ not found. Additional error information from SQL Server is included below.

Cannot open database “WSS_Content_0b7f009c-3635-4019-9c1c-f6cbdac3cfcb” requested by the login. The login failed.
Login failed for user ‘domain\svc_SP2010DemoSvcApp’.

Yep, I kid you not – the service account seems to be trying to access the content database bypassing the API or something – because when I added that user to the database (no special privileges, just public and the public role in SQL) it worked a treat.

Tip 1 – look in the Event viewer first – it might save you time.

Tip 2 – Microsoft, if you are going to throw errors, can you do it consistently? How about this message in the ULS logs too, huh?

Tip 3 – Be good to your mum.

Brad

[UPDATE 30/11/2010] – My mate Yaohan has also hit the same error but with a different core issue – Office Web Apps fails when you use Track Changes – http://yaohany.wordpress.com/2010/09/22/word-web-app-cannot-open-this-document-for-viewing-because-of-an-unexpected-error-to-view-this-document-open-it-in-microsoft-word/

Advertisements

About Brad Saide

I'm a SharePoint consultant. I'm also slowly going bald, seem to have a permanent spare tyre around my waist and enjoy socialising with friends over a beer or 10. The last 2 may possibly be related. Started working with SharePoint when the first version was in limited beta release (participated in the Technology Adoption Program while at Woolworths) and have been committed to the adoption of the technology as a business enabler ever since.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Fun with Office Web Apps…

  1. Conor says:

    Thanks for the update. Track changes was enabled on a lot of my documents causing some, but not all, not to open.

  2. Javier says:

    Thanks!! You saved my week.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s