Q: Can I use
ASP.NET MVC 4 Web API to serve XOD files to WebViewer?
A:
In general, we recommend pre-converting documents and serving XOD files as static resources for the best performance.
(WebViewer uses HTTP range requests to efficiently download only parts of the XOD file it needs.)
However, in the case where pre-converting is not possible... Yes, you can serve XOD file directly with
ASP.NET MVC 4 Web API.
You can download a sample project showing how to do this here:
This sample shows how to serve a xod file from a controller (ApiController class).
(It will load from a file, but you can adapt this to return any file stream. So you can use PDFNet SDK to convert and return the data.)
This sample also shows how WebViewer is set up to consume the data from the controller.