728x90
1. 403.4번 에러 페이지를 작성하는 방법
http://www.jppinto.com/2009/01/automatically-redirect-http-requests-to-https-on-iis-6/
HTML 파일로 에러 페이지 작성하는 방법.
<!-- beginning of HttpRedirect.htm file --> <script type= "text/javascript" > function redirectToHttps() { var httpURL = window.location.hostname+window.location.pathname; window.location = httpsURL ; } redirectToHttps(); </script> <!-- end of HttpRedirect.htm file --> |
2. 서버에서 iis 관리자 접속 -> ssl 설정 --> ssl필요 체크를 푼다.
소스에서 아래 코딩 추가 한다.
//http 연결에서 보안 소켓 사용 여부를 가져오는 로직
if (!Request.IsSecureConnection)
{
string redirectUrl = Request.Url.AbsoluteUri.Replace("http:", "https:");
Response.Redirect(redirectUrl);
}
if (!Request.IsSecureConnection)
{
string redirectUrl = Request.Url.AbsoluteUri.Replace("http:", "https:");
Response.Redirect(redirectUrl);
}
728x90
'개발및업무 > C#' 카테고리의 다른 글
[ASP.NET] ASP.NET 인증 종류 외 Provider 정의 (0) | 2012.06.20 |
---|---|
[ASP.NET] WEB GARDEN (0) | 2011.12.27 |
[ASP.NET] using 문 (0) | 2011.09.29 |
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 형식의 사용 권한을 요청하지 못했습니다. (0) | 2011.08.29 |
텍스트 박스 한글 영어 입력 방법 (0) | 2011.07.20 |