독까의 이야기

Windows 2012 R2 IIS 8.5 & DextUpload 모듈 사용시 IIS 설정

웹호스팅 이전으로 서버가 변경 된 웹사이트에서 첨부 파일 다운로드 불가 발생

기존 192.168.10.101 -> 192.168.10.102 로 이전

10.101 에서는 첨부파일 다운로드 정상 확인

10.102 에서는 첨부파일 다운로드시 "오류 코드: ERR_CONNECTION_ABORTED" 발생

다운로드 소스 확인

Set objDownload = Server.CreateObject("DEXT.FileDownload")
     objDownload.DownloadBlob RS("filedata"), RS("filename"), true
Set objDownload = Nothing

[DownloadBlob] 메서드를 이용하여 다운로드를 진행함을 확인


===================덱스트 업로드 예제 파일 문서 확인 ============================

Database BLOB 데이터 다운로드

FileDownload개체의 DownloadBlob Method는 서버에 있는 Database BLOB을 웹브라우저를 통해 사용자의 디스크 파일로 다운로드 받을 수 있게 한다. Database 관련부분을 제외하고는 Download Method와 사용법이 동일하다.

[ DownloadBlob.asp ]

<%@ Language=VBscript %>
<%Response.Buffer= False
Setrs=Server.CreateObject("ADODB.Recordset")<br>strQuery="SELECT*FROMSampleTableWHEREid="&Request.QueryString("id")<br>rs.OpenstrQuery,"DSN=SampleDSN;UID=sa;PWD=xxx;", 3, 1

Response.AddHeader "Content-Disposition","attachment;filename=" & rs("filename")
Response.AddHeader "Content-Length", rs("fildata").ActualSize

Response.ContentType = "application/unknown"
Response.CacheControl = "public"

Set objDownload = Server.CreateObject("DEXT.FileDownload")
objDownload.DownloadBlob rs("filedata")
Set uploadform = Nothing

rs.Close
Set rs = Nothing
%>



고객사의 DB 접속하여 첨부파일의 경로를 확인 : BLOB 방식으로 데이터값을 저장 / 2진수 변환 저장

(참고 : http://www.mssqltips.com/sqlservertip/1489/using-filestream-to-store-blobs-in-the-ntfs-file-system-in-sql-server-2008/)

===========================================================================================================================================


IIS 설정을 변경

IIS - 전역 ASP 설정 - 청크 분할 인코딩 사용 : True -> False 로 변경


첨부파일 정상 다운로드 확인