public FileDownloadReturnMessage DownloadFile(FileDownloadMessage request) { FileDownloadReturnMessage message; string localFileName = request.MetaData.LocalFileName; try { string str2 = ConfigurationManager.AppSettings["FileTransferPath"]; string path = Path.Combine(str2, request.MetaData.RemoteFileName); Stream stream = new FileStream(path, FileMode.Open); message = new FileDownloadReturnMessage(new FileMetaData(localFileName, path, "1"), stream); } catch (IOException exception) { throw new FaultException <IOException>(exception); } return(message); }
public FileDownloadReturnMessage DownloadFile(FileDownloadMessage request) { FileDownloadReturnMessage message; string localFileName = request.MetaData.LocalFileName; try { string str2 = ConfigurationManager.AppSettings["FileTransferPath"]; string path = Path.Combine(str2, request.MetaData.RemoteFileName); Stream stream = new FileStream(path, FileMode.Open); message = new FileDownloadReturnMessage(new FileMetaData(localFileName, path, "1"), stream); } catch (IOException exception) { throw new FaultException<IOException>(exception); } return message; }