While rendering office documents through Office Web apps 2013, you may receive a 404, or Server Error, when on Mobile devices. This is more likely to occur when attempting to render the documents through Search results and then using Search Refiners. This is because the URL can become very large and increase as more refiners are added to the search query.
There is a two part fix to allow for large query strings to be based to Mobile devices.
The first hurdle is a default limit set in IIS, and you will see a similar error as seen below (Figure 1).
You may see 404.15 in the IIS logs.
To resolve this go to the Office Web Apps Server and modify the IIS ApplicationHost.Config file, located here <c:\windows\system32\inetsrv\config>.
Add the following inside the 'requestFiltering' tag. If you already have these elements, increase the value to the specified values below.
<requestLimits maxAllowedContentLength="2147483647" maxUrl="2147483647" maxQueryString="2147483647" />
There is similar IIS documentation here.
Now that the limitation in IIS is increased you may notice that the error changes, similar to Figure 2.
To resolve this we need to add the httpRuntime element to the Office Web Apps Root site.
On the Office Web Apps RootWebSite (Port 80 site), open the web.config file. This is located here, <c:\program files\Microsoft Office Web Apps\RootWebSite>.
Add the following inside the <configuration> tag.
<httpRuntime maxRequestLength="400000" maxUrlLength="40960" maxQueryStringLength="16048" />
Reset IIS on the Office Web Apps Server.