Blog Post

Core Infrastructure and Security Blog
4 MIN READ

There was a problem and we can't open this document

ChristianHeim's avatar
ChristianHeim
Icon for Microsoft rankMicrosoft
Jan 22, 2019

First published on TECHNET on Oct 17, 2016

I've been running into following scenario for the second time now, that's why I decided to share my experience with you.

 

A customer just set up an Office Web Apps Server 2013 farm. After finishing the Office Web Apps installation/configuration, SharePoint WOPI bindings have been set up properly. As the customer wanted to check Office Web Apps funtionality, he had to deal with a strange misbehaviour.

 

Summary of what the customer did so far:




    • Installing Office Web Apps 2013 binaries

 

    • Installing a valid SSL certificate for the Office Web Apps URL

 

    • Creating a DNS record for the Office Web Apps Server URL

 

    • Configuring Office Web Apps Server 2013

 

 

    • Succesfully creating SharePoint Wopi binding to the Office Web Apps Server



Testing the Office Web Apps Server functionality in the context of a regular SharePoint user account (do not test using the System/farm account - this would result in an error) leads to no success: After clicking on a Word document, the browser is obviously communicating with Office Web Apps webservices. You could tell by the appearing logos and toolbars within the browser. We are hitting the Office Web Apps:







Anyway, the request leads to following website error in the browser after some seconds:








Sorry, there was a problem and we can't open this document. If this happens again, try opening the document in Microsoft Word.




At the same time, two unexpected errors are tracked in the Trace log on the Office Web Apps Server:





Product: Office Web Apps
Category: WAC Hosting Interaction
Level: Unexpected
Message: HttpRequestAsync, (WOPICheckFile,WACSERVER) no response [WebExceptionStatus:ConnectFailure, url:https://portal.randomdomain.com/sites/randomsite/_vti_bin/wopi.ashx/files/97e7e3948a784b8fae43932af015075d?access_token=REDACTED_1056&access_token_ttl=1476833984003, exception:System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.50.50:443
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
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.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.Office.Web.Apps.Common.HttpRequestAsync.GetResponseCallback(IAsyncResult asyncResult)]


Product: Office Web Apps
Category: WAC Hosting Interaction
Level: Unexpected
Message: WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException: HttpRequest failed ---> Microsoft.Office.Web.Apps.Common.HttpRequestAsyncException: No Response in WebException ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.50.50:443
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
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.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.Office.Web.Apps.Common.HttpRequestAsync.GetResponseCallback(IAsyncResult asyncResult) -
-- End of inner exception stack trace --- -
-- End of inner exception stack trace ---
at Microsoft.Office.Web.Apps.Common.WopiDocument.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException)
at Microsoft.Office.Web.Apps.Common.HttpRequestAsync.End()
at Microsoft.Office.Web.Apps.Common.WopiDocument.GetWopiRequestResultWithRetry(Int32 maxSize, MemoryStream ms, WopiRequest wopiRequest)
at Microsoft.Office.Web.Apps.Common.WopiDocument.CheckWopiFile()].




Solution:

 

So what was the issue here? SharePoint successfully initiated communication to the Office Web Apps Server, by generating a proper WopiFrame link. This indicates things seems to be okay on the SharePoint side. By looking closer to the Office Web Apps machine, I noticed DNS name resolution was not properly working . I checked whether the Office Web Apps Server could resolve the SharePoint Web Application URL, in order to find the way back to the SharePoint URL, the request was initiated from. That was not the case.

 

The customer was currently in preparation for a SharePoint migration (SP2010 >> SP2013). SharePoint URLs would stay the same on the target farm. For that reason, SharePoint URLs have been specified in the hosts file of all relevant test clients and on the SharePoint 2013 servers itself. On the Office Web Apps servers, nobody thought about that issue, therefor the Office Web Apps webservices pulled the IP from the DNS that was linked to the SharePoint 2010 system.




Conclusion:

 

Make sure that the correct IP adress gets resolved for the SharePoint Web Application Office documents are stored in and requests are initiated from. Name resolution is not just important for the clients, it has to work properly on the Office Web Apps Server also, in order to find the way back to SharePoint.




This scenario is also valid for Offce Online Server 2016 and SharePoint 2016.

Updated Mar 02, 2020
Version 3.0

1 Comment

  • Reuben_Ndlovu's avatar
    Reuben_Ndlovu
    Copper Contributor

    My WAC Server was working for the past 2/3 months and just few days ago started getting error message simlar to the ones posted above.

    In the logs files I get the following errors:

     

    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x3DA4 Office Web Apps WAC Hosting Interaction adhrj Monitorable HttpRequestAsync (WOPICheckFile,WACSERVER), request failure [HttpResponseCode:NotFound, HttpResponseCodeDescription:Not Found, url:http://spserver:port/IT/_vti_bin/wopi.ashx/files/8d7c0cb9ac1a47398f62fefb3120d9e5?access_token=REDACTED_1064&access_token_ttl=1669681408139] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x3DA4 Office Web Apps WAC Hosting Interaction adhrr Medium HttpRequestAsync (WOPICheckFile,WACSERVER) Setting Completion [Time in ms: 30071, Bytes Read: 0] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x3DA4 Office Web Apps WAC Hosting Interaction ajdv9 Medium HttpRequestAsync (WOPICheckFile,WACSERVER) SetCompletion Track start | setting trackers | WebRequest.Create() | Create() returned | _req.ContentLength 0 | setting request headers | setting user agent | setting keep alive | setting timeout callback | Start calling StartResponseProcessing | StartResponseProcessing._req.BeginGetResponse() | BeginGetResponse() returned | StartResponseProcessing RETURNS | Start RETURNS | End.AsyncWaitHandle.WaitOne() | GetResponseCallback isSync:False | _req.EndGetResponse() | GetResponseCallback WebException | RecordWebException | RecordResponse NotFound | SetCompletion False | 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Office Web Apps WAC Hosting Interaction ag7m6 Medium WOPI Http Request Completed [host machine name:, version:, host correlation:] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Office Web Apps WAC Hosting Interaction ajahy Medium Error message from host: Verifying signature failed, host correlation: 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Office Web Apps WAC Hosting Interaction agmoa Medium WOPICheckFile,WACSERVER FileNotFound [url:http://spserver:port/IT/_vti_bin/wopi.ashx/files/8d7c0cb9ac1a47398f62fefb3120d9e5?access_token=REDACTED_1064&access_token_ttl=1669681408139, host correlation:] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Office Web Apps WAC Hosting Interaction adhsk Unexpected WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.FileUnknownException: WOPI 404 at Microsoft.Office.Web.Apps.Common.WopiDocument.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException) at Microsoft.Office.Web.Apps.Common.HttpRequestAsync.End() at Microsoft.Office.Web.Apps.Common.WopiDocument.GetWopiRequestResultWithRetry(Int32 maxSize, MemoryStream ms, WopiRequest wopiRequest) at Microsoft.Office.Web.Apps.Common.WopiDocument.CheckWopiFile()] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Office Web Apps WAC Hosting Interaction ajjve Medium WOPI CheckFile: Catch-All Failure [url:http://spserver:port/IT/_vti_bin/wopi.ashx/files/8d7c0cb9ac1a47398f62fefb3120d9e5] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Services Infrastructure Services Infrastructure Logging ai94t Unexpected FileUnknownException while loading the app. [FileSourceId: -1088102096] [ClusterId: 0] [ExtraErrorInfo: ] 2538332f-189a-4c87-ae0b-9a555e31dc3f
    11/28/2022 16:23:58.78 w3wp.exe (0x0C20) 0x2D4C Office Web Apps Office Web Apps common af46w Medium WACServer HttpModule: Completed request with status code [200] 2538332f-189a-4c87-ae0b-9a555e31dc3f