public void UrlReferrerCheck(string refferUrl) { if (Request.UrlReferrer == null) { string script = "< script>alert('직접 접근할 수 없습니다!!');" +"location.href='/Default.aspx'; "; Page.RegisterClientScriptBlock(" done ", script); //Response.Redirect(refferUrl); } else { string refer = Request.UrlReferrer.ToString(); string ServerPath = Request.Url.ToString(); ServerPath = ServerPath.Substring(0, ServerPath.LastIndexOf(" / ")); if (refer.IndexOf(ServerPath) == -1) { string script = " < script> alert('직접 접근할 수 없습니다!!'); " + " location.href = '/Default.aspx'; "; Page.RegisterClientScriptBlock(" done ", script); //Response.Redirect(refferUrl); } } }
2003/10/24
Referrer값 체크로 특정파일에 직접 접근 거부
레퍼러값을 체크하는 방법 2가지 입니다. 먼저, 레퍼러값이 null 값일경우 Default.aspx 페이지로 리다이렉팅. 만일 레퍼러값이 있을경우 현재, 사이트의 도메인과 레퍼러주소의 도메인이 다를경우 다시 Redirect 를 합니다. 바로 Redirect 를 해도 되지만, 자바스크립트로 Alert 를 띄운후 처리..
가장 많이 본 글
-
로그 이름: System 원본: Microsoft-Windows-WindowsUpdateClient 이벤트 ID: 20 작업 범주: Windows Update 에이전트 수준: 오류 키워드: 실패,설치 사용자: SYSTEM 설명: 설치 실...
-
트라이콤 교육센터에서,. ARP Spoofing 악성코드 대응책과 Forefront Client Security 대응 방법 주제로 세미나를 하는 것 같습니다. 이미 공개된 여러 자료가 많아서 보안에 조금이라도 관심이 있는 관리자는 ARP Spoofi...
-
http://support.microsoft.com/kb/187614/ko 허가되지 않은 클라이언트가 터미널 서버에 처음 연결하는 경우 터미널 서버는 클라이언트에 임시 터미널 서버 CAL(클라이언트 액세스 라이선스) 토큰을 발급합니다. 사용자가 세션에...
댓글 없음:
댓글 쓰기