Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.5 KiB

  1. <% @ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Buffer=TRue %>
  4. <HTML>
  5. <HEAD>
  6. <TITLE> Show Client Certificate Mapping </TITLE>
  7. </HEAD>
  8. <BODY>
  9. <FONT SIZE="4" FACE="ARIAL, HELVETICA">
  10. <B> Display Client Certificate Mapping</B></FONT><BR>
  11. <HR SIZE="1" COLOR="#000000">
  12. For this sample to work properly, You need to do following: <BR>
  13. 1.uncheck anonymous authentication. <BR>
  14. <B>Here is a list of client mappings on default web server </B><BR>
  15. <%
  16. Dim objW3svr, objCertMapper, vntCert, vntAccnt, vntPassword, strMapName, bEnabled
  17. Dim i
  18. Err.Clear
  19. On Error Resume Next
  20. Set objW3svr=GetObject("IIS://Localhost/W3SVC/1")
  21. If Err.number <>0 Then
  22. Response.Write "GetObject function failed. You might not have the right perm<BR>"
  23. Response.End
  24. End if
  25. %>
  26. <HR>
  27. <TABLE border>
  28. <TR><TH>NT Account</TH><TH>Mapping Name</TH><TH>Enabled</TH></TR>
  29. <% For Each objCertMapper In objW3svr
  30. If UCASE(objCertMapper.class) = "IISCERTMAPPER" Then
  31. i=1
  32. objCertMapper.GetMapping 4, CStr(i), vntCert, vntAccnt, vntPassword, strMapName, bEnabled
  33. Do While Err.Number = 0 %>
  34. <TR>
  35. <TD><% = vntAccnt %> </TD>
  36. <TD><% = strMapName %></TD>
  37. <TD><% If bEnabled Then %> True<% Else %> False <% End If %></TD>
  38. </TR>
  39. <% i=i+1
  40. objCertMapper.GetMapping 4,CStr(i), vntCert, vntAccnt, vntPassword, strMapName, bEnabled
  41. Loop
  42. Set objCertMapperr = Nothing
  43. End If
  44. Next
  45. %>
  46. </TABLE>
  47. </BODY>
  48. </HTML>