Office Web Apps 2013 throws a 404 error on Mobile devices

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).

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.

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.

Comments (2)
  1. Anonymous says:

    So we need a workaround for the error message as well?

  2. Anonymous says:

    This is not really a workaround, rather an increase of the limits for both IIS and Office web apps, so that they can both handle much larger URLs that are generated from refined SharePoint searches. The first change is to increase the limits in IIS, which
    will generate the first error. The second error is generated from Office Web Apps Server, which can also be resolved via the modifications in the second step. So, once both the IIS and Office Web Apps server limits are increased, you should now be able to
    handle increased URLs.

Comments are closed.

Skip to main content