Q: How can I load XOD files from a server file path (e.g. C:\files\document.xod)?
Because WebViewer is a client-side HTML5 application, it cannot load files from local paths.
We recommend that you host your XOD documents as static files on your web server.
If you are concerned with security and do not want your XOD files to be accessible to the public, we recommend still hosting XOD files statically, but set up additional security measures.
For example, you can configure Basic Authentication on your server.
The following URL shows how to add an authentication header to WebViewer's requests.
You could also set up secure intranets, firewalls, etc.
Alternatively, you can have a server-side script that loads files from your server file path and returns it in a HTTP response.
has a sample in ASP.NET
called "WebViewerStreamingSample" that shows something similar. The sample converts PDFs to XOD on the fly and returns it, but in this case, you would simply load the XOD file and return that.
However, this is not ideal because you don't get the benefit of byte range requests and other optimizations that web servers do when serving static files.