Esempio n. 1
0
        public void SetServerInfo(string transferinfo)
        {
            Log.Debug(transferinfo);
            _fileService = null;
            var transfer = GetTransferInfo(transferinfo);

            if (transfer == null)
            {
                _errmsg = FileServerIsNotSetting;
                throw new ApplicationException(_errmsg);
            }
            InitFileServerInfo(transfer);
        }
Esempio n. 2
0
 internal void InitializeServer()
 {
     CheckUrl();
     _fileService = new TransferWebServices()
     {
     };
     _fileService.Timeout = 1000 * 60 * 60; //服务超时设为1小时
     _fileService.Url     = WebServicesUri;
     Log.Debug(_fileService.Url);
     _fileService.SetWebServicesDirectory(string.IsNullOrEmpty(VirtualDirectory)?"":"./");
     _fileService.SetWebServicesFileDirectory(string.IsNullOrEmpty(FileDirectory)?"./Accessories":"./" + FileDirectory);
     if (_environment != null)
     {
         Log.Info("Set the proxy");
         _fileService.Proxy             = _environment.WebProxy;
         _fileService.Proxy.Credentials = _environment.ProxyCredentials;
     }
 }