public RemoteFileInfo svcHTTPFileTransferServiceDownloadFile(DownloadRequest request)
 {
     if (EntsvcHTTPFileTransferServiceDownloadFile != null)
     {
         return EntsvcHTTPFileTransferServiceDownloadFile(request);
     }
     else
         return null;
 }
 public RemoteFileInfo svcHTTPFileTransferServiceDownloadFile(DownloadRequest request)
 {
     if (EntsvcHTTPFileTransferServiceDownloadFile != null)
     {
         return(EntsvcHTTPFileTransferServiceDownloadFile(request));
     }
     else
     {
         return(null);
     }
 }
        RemoteFileInfo BootstrapServiceDomain_EntsvcHTTPFileTransferServiceDownloadFile(DownloadRequest request)
        {
            string filePath;            
            string installerPath;
            System.IO.FileInfo fileInfo;
            string configurationFilePath;            
            string basePath;
            try
            {
                Assembly ass = Assembly.GetEntryAssembly();
                XmlDocument xDoc = new XmlDocument();
                configurationFilePath = (Assembly.GetAssembly(this.GetType()).Location.Replace("VMukti.Presentation.exe", ""));
                configurationFilePath += @"sqlceds35.dll";
                xDoc.Load(configurationFilePath);
                XmlNode xn = xDoc.SelectSingleNode("/Root/OtherSettings/PhysicalPathOfVirtualDirectory");
                basePath = DecodeBase64String(xn.Attributes[0].Value);

                installerPath = basePath + "\\" + request.FolderWhereFileIsStored;

                //Check if directory specified exists
                if (Directory.Exists(installerPath))
                {
                    //Get info about the input file
                    filePath = System.IO.Path.Combine(installerPath, request.FileName);
                    fileInfo = new System.IO.FileInfo(filePath);

                    // check if exists
                    if (!fileInfo.Exists)
                    {
                        ClsException.WriteToLogFile("BootstrapServiceDomain_EntsvcHTTPFileTransferServiceDownloadFile()--:--BootStrapDomain.cs--:--File Not Found(" + request.FileName + ")" + " :--:--");
                    }

                    // open stream
                    System.IO.FileStream stream = new System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read);

                    RemoteFileInfo result = new RemoteFileInfo();
                    result.FileName = request.FileName;
                    result.Length = fileInfo.Length;
                    result.FileByteStream = stream;
                    return result;

                }
                else
                {
                    ClsException.WriteToLogFile("BootstrapServiceDomain_EntsvcHTTPFileTransferServiceDownloadFile()--:--BootStrapDomain.cs--:--" + "Directory Not Found(" + request.FolderWhereFileIsStored + ")" + " :--:--");
                }


            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "BootStrapServiceDomain_EntsvcNetP2pFileTransferServiceUploadFileScript()", "Domains\\BootstrapServiceDomain.cs");
            }
            return null;
        }