public Stream GetDem(string id, int level, int x, int y) { Stream stream = null; try { OutgoingWebResponseContext context = WebOperationContext.Current.OutgoingResponse; context.Headers.Add(System.Net.HttpResponseHeader.CacheControl, "public"); context.ContentType = "application/octet-stream"; context.StatusCode = System.Net.HttpStatusCode.OK; stream = pyramidRepositoryInstance.GetDem(id, level, x, y); } catch (FaultException) { throw; } return(stream); }