Triệu chứng
Hãy xem xét tình huống sau:
-
Dịch vụ vai trò Đăng ký Web Dịch vụ Chứng chỉ được cài đặt Windows trên máy chủ dựa trên Server 2008 R2.
-
Bạn có một máy tính khách đang chạy Internet Explorer 10 hoặc phiên bản mới hơn.
-
Bạn tìm cách truy nhập trang Đăng ký Web Dịch vụ Chứng chỉ được lưu trữ trên Windows chủ dựa trên Server 2008 R2.
Trong kịch bản này, internet Explorer sẽ nhận được lỗi sau:
Trình duyệt Web này không hỗ trợ tạo yêu cầu chứng chỉ
Nguyên nhân
Kiểm tra Phiên bản Trình duyệt xác định sai phiên bản Internet Explorer là "IE 1".
Cách giải quyết
Giải pháp thay thế được hỗ trợ cho vấn đề này như sau:
-
Cấu hình dạng xem tương thích trong Internet Explorer.
-
Di chuyển chức năng trang Đăng ký Web sang Windows Server 2012.
-
Sửa đổi tệp Certsbrt.inc bằng cách thay thế các dòng 44 đến 70 bằng nội dung sau đây. Certsbrt.inc nằm trong thư mục sau đây:
%WINDIR%\system32\certsrv\en-us
'
' If there is no '.' in the UserAgent string, this will return the next character if any
' as the version number. ' We extract the string until a '.' and then convert it
' into integer. If -1 is returned from this function then it isn't MSIE
'
Function GetInternetExplorerVersionNumber(sHttpUserAgent)
Dim nMSIE
GetInternetExplorerVersionNumber = -1 nMSIE = InStr(sHttpUserAgent, "MSIE")
If 0 <> nMSIE Then
numChar = InStr(Mid(sHttpUserAgent, nMSIE + 5), ".") - 1
If -1 = numChar Then ' no '.' in the string
numChar = 1
End If
If nMSIE + 5 + numChar - 1 <= Len(sHttpUserAgent) Then
GetInternetExplorerVersionNumber = CInt(Mid(sHttpUserAgent, nMSIE + 5, numChar))
End If
End If
End Function
'
' We define a Old MSIE based browser
' if it has the string MSIE that is followed by a version number that is less than 4
' NOTE:
' IsOldMSIE = False does not imply MSIE >= 4.
'
' i.e. Not IsOldMSIE("abc") = True
' Not IsOldMSIE("MSIE") = True
'
Function IsOldMSIE(sHttpUserAgent)
Dim nMSIE
Dim sMSIEVersion
IsOldMSIE = False
nMSIE = InStr(sHttpUserAgent, "MSIE")
If nMSIE <> 0 AND (nMSIE+5 < Len(sHttpUserAgent)) Then
nVersion = GetInternetExplorerVersionNumber(sHttpUserAgent)
If -1 <> nVersion Then
IsOldMSIE = nVersion < NEW_MSIE_VERSION
End If
End If
End Function
Thông tin Bổ sung
Các dòng từ 44 đến 70 trong tệp unmodified Certsbrt.inc trên máy chủ dựa trên Windows Server 2008 R2 như sau. Đây là những đường cần được thay thế.
'
' We define a Old MSIE based browser
' if it has the string MSIE that is followed by a version number that is less than 4
' NOTE:
' IsOldMSIE = False does not imply MSIE >= 4.
'
' i.e. Not IsOldMSIE("abc") = True
' Not IsOldMSIE("MSIE") = True
'
Function IsOldMSIE(sHttpUserAgent)
Dim nMSIE
Dim sMSIEVersion
nMSIE = InStr(sHttpUserAgent, "MSIE")
If nMSIE=0 Then
IsOldMSIE = False
ElseIf nMSIE+5 < Len(sHttpUserAgent) Then
sMSIEVersion = Mid(sHttpUserAgent, nMSIE+5, 1)
IsOldMSIE = CInt(sMSIEVersion) < NEW_MSIE_VERSION
Else
IsOldMSIE = False
End If
End Function