1
보안 팝업을 비활성화하려고 시도했지만 계속 묻습니다.웹 브라우저 컨트롤의 "보안 경고"창을 비활성화하지 못했습니다.
오류 팝업 :
Do you want to view only the webpage content that was delivered securely This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage.”“This page contains both secure and nonsecure items. Do you want to display the nonsecure items?”
WPF :
<WebBrowser Name="wbGateway" Width="700" Height="600"
OverridesDefaultStyle="False"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden"></WebBrowser>
코드 : 여기
private void wbGateway_Navigating(object sender, NavigatingCancelEventArgs e)
{
ServicePointManager.ServerCertificateValidationCallback = new
RemoteCertificateValidationCallback(ValidateServerCertificate);
}
public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
return true;
}
사이드 참고 : SSL 꽤 쓸모하게하지 않으면 당신은 정말, 몇 가지 유효성 검사를해야한다. 예를 들어 특정 인증서 지문을 화이트리스트에 표시 할 수 있습니다. – CodesInChaos
네, 맞습니다. 문제는 페이지가 내 제어 할 수 없다는 것인데, 내가해야 할 일은 웹 브라우저 컨트롤에 페이지를 넣고 보안 및 자바 스크립트 오류를 비활성화하는 것입니다. – Alvin
인증서 유효성 검사는 클라이언트 측의 우려 사항입니다. 좋은 유효성을 얻으려면 서버를 변경할 필요가 없습니다. – CodesInChaos