하얀늑대 :: 하얀늑대의 일상
bloghome Tags |  Guestbook | 
  Tags
시디복구 한잔 Rss mysql Office 주민등록번호 체크 쿠키 인터넷 Flex 듀얼모니터 new 파워포인트 textarea 엠파스 Stress 웹로직 속도개선 고객관리 2003서버
banner
하얀늑대 ::
하얀늑대의 일상

Google
내블로그에서 검색
 하얀늑대는?
 Category
allow  모두보기 (257)
spacespace Today Story's (10)
spacespace 핫이슈 (19)
spacespace 디카질 (4)
spacespace Javascript (15)
spacespace 2000 server (9)
spacespace 2003 server (3)
spacespace 리눅스 (3)
spacespace UCC (6)
spacespace 컴퓨터 Tip (15)
spacespace IT news (52)
spacespace 웹 접근성 (3)
 Tags
보안서버 시디복구 회사가기시러쏭 데이트 웹페이지 부적 AB형 입냄새 최적화 타겟층 vluu nv10 쿠키 강아지쏭 서버 IP 프로그램 이슈 위키 function 사랑
  Calendar
<< 2009 January >>
S M T W T F S
28 29 30 31 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 New Post
line 프로그램에서 전화걸기
line HTML 요소 이름의 풀어쓴
line UI 개발자를 위한 북마크
line 대한민국 웹 표준 사이트
line MS-SQL 설치가이드
 New Comment
line클럽4242 : 10/03/17
reply우리사이 좋은사이!! 클
linesusanna : 08/11/07
replyhey,find <a href=http:
line하얀늑대 : 08/05/22
reply위에 페이지는 한페이지 내
line아아아 : 08/04/26
reply개새끼는너야
line아이니 : 08/02/23
reply《$mode 값이 mailsend 일
 New Tracbacks
lineWeb 1.0 과 Web 2.0
line06/11/18
line괴물 - 2006. 7. 28.
line06/07/29
 New Archive
2010 July (1)
2010 April (3)
2009 August (1)
2009 April (2)
2009 March (1)
...more
  Link Site
올블로그
KOON
태터툴즈
엑스파이더
심프로그
디지털예보
thesimplog.com
feed rss
 Visitor Statistics
Total  :  238412
Today :  52
Yesterday :  150


 Google



blog bar tagsbar guest loginbarlogoutbarX-inbar
line MSXML2.ServerXMLHTTP 에러처리
Today Story's | 09/01/07 | 하얀늑대
오류가 발생할경우 해당 오류를 처리할수 있는 방법을 설명하고 있습니다. 즉,

 

sUrl = "http://www.request.com/request.php"
set oHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
 '오류가 발생할경우 무시하고 다음 처리구문으로 이동함

on error resume next    

oHttp.Open "GET", sUrl, False
oHttp.Send ""
'지정한 경로의 서버상태값을 가지고 옵니다. (200, 404, 500 등)

status = oHttp.status

 

'오류가 있거나 (오류가 없을경우 err.number가 0 값을 돌림) status 값이 200 (로딩 성공) 이 아닐경우

if err.number <> 0 or status <> 200 then
      if status = 404 then

            Response.Write "존재하지 않는 페이지 입니다.(404)"

      elseif status >= 401 and status < 402 then

            Response.Write "접근이 금지된 페이지 입니다.(401)"

      elseif status >= 500 and status <= 600 then
            Response.Write "내부 서버 오류 입니다.(500)"

      else

            Response.Write "서버가 다운되었거나 올바른 경로가 아닙니다."

      end if

 

'오류가 없음 (문서를 성공적으로 로딩함)

else

      Response.Write oHttp.ResponseText

end if

 

Set oHttp = Nothing

 


태그: MSXML2.ServerXMLHTTP
bullet관련글0 | 댓글0
이전/ [1] / 다음 top