public IHttpActionResult GetAppResource(string appId, string resourceId)
        {
            try
            {
                var resource = _applicationManager.GetResource(appId, resourceId);
                try
                {
                    var content = new ByteArrayContent(File.ReadAllBytes(resource.DataPath));
                    var result  = new HttpResponseMessage(HttpStatusCode.OK)
                    {
                        Content = content
                    };
                    var disposition = new ContentDispositionHeaderValue("attachment")
                    {
                        FileName = resource.Filename
                    };
                    var type = new MediaTypeHeaderValue("application/octet-stream");

                    result.Content.Headers.ContentDisposition = disposition;
                    result.Content.Headers.ContentType        = type;

                    return(ResponseMessage(result));
                }
                catch (Exception)
                {
                    return(NotFound());
                }
            }
            catch (ApplicationHostException ex)
            {
                return(ex.NotFound
                    ? (IHttpActionResult)NotFound()
                    : BadRequest(ex.Message));
            }
        }