프로젝트

일반

사용자정보

개정판 a2a64028

IDa2a64028aa7d857c5b336add73650b0232fbf097
상위 f5c6a3d5
하위 1a3656c9

김태성이(가) 약 5년 전에 추가함

ConvertService Webclient Dispose

Change-Id: I2da15bf6437478fb2724f83139ba2e130ced6da2

차이점 보기:

ConvertService/ServiceBase/Markus.Service.Convert/ConvertService.cs
283 283
            {
284 284
                result.Message = "ConvertService Convert Error" + ex.Message;
285 285
                result.StatusCode = StatusCodeType.Error;
286

  
287
                logger.Error(ex);
286 288
            }
287 289
            finally
288 290
            {
......
355 357
                        using (System.Net.WebClient webClient = new System.Net.WebClient())
356 358
                        {
357 359
                            webClient.UseDefaultCredentials = true;//.Headers.Add("Authorization: BASIC SGVsbG8="); //가상의 인증
358

  
360
                            webClient.Proxy = null;
359 361
                            //if (!System.IO.Directory.Exists(ConvertProcessContext.TempDirectory))
360 362
                            //{
361 363
                            //    System.IO.Directory.CreateDirectory(ConvertProcessContext.TempDirectory);
362 364
                            //}
363 365

  
364 366
                            await webClient.DownloadFileTaskAsync(pdfFileUri, downloadFilePath);
367
                            webClient.Dispose();
365 368
                        }
366 369
                    }
367
                    catch (Exception)
370
                    catch (Exception ex)
368 371
                    {
372
                        logger.Error(ex);
369 373
                        throw new Exception("File Download Error. Please, check the file path.");
370 374
                    }
371 375
                }
......
393 397

  
394 398
                    }
395 399
                }
396
                catch (Exception)
400
                catch (Exception ex)
397 401
                {
402
                    logger.Error(ex);
398 403
                    throw new Exception("File Error ." + downloadFilePath);
399
                    throw;
400 404
                }
401 405
            }
402 406
            catch (Exception ex)
403 407
            {
408
                logger.Error(ex);
404 409
                throw new Exception(ex.ToString());
405
                result = false;
406 410
            }
407 411

  
408 412
            return result;

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)