public HttpResponseMessage LoadDocument(string ConnectionID, string DocumentName) { // connect the WebSocketHandler with the ConnectionID WebSocketHandler wsHandler = WebSocketHandler.GetInstance(ConnectionID); // the document directly server-side wsHandler.LoadText(System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data/" + DocumentName), StreamType.WordprocessingML); return(new HttpResponseMessage() { StatusCode = HttpStatusCode.OK }); }