Leaked source code of windows server 2003
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.

63 lines
1.6 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Check the schema for errors</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <%
  7. 'Carrage Return + Line Feed pair
  8. Dim CRLF
  9. CRLF = CHR(13) + CHR(10)
  10. Sub DisplayCheckError(ByRef objSchemaError)
  11. Dim strId
  12. Dim strSeverity
  13. Dim strDescription
  14. Dim strKey
  15. Dim strProperty
  16. strId = CStr(objSchemaError.Id)
  17. strSeverity = CStr(objSchemaError.Severity)
  18. strDescription = objSchemaError.Description
  19. strKey = objSchemaError.Key
  20. strProperty = CStr(objSchemaError.Property)
  21. Response.Write("Id: " & strId & "<br>" & CRLF)
  22. Response.Write("Severity: " & strSeverity & "<br>" & CRLF)
  23. Response.Write("Description: " & strDescription & "<br>" & CRLF)
  24. Response.Write("Key: " & strKey & "<br>" & CRLF)
  25. Response.Write("Property: " & strProperty & "<br>" & CRLF)
  26. End Sub
  27. Dim objMetaUtil
  28. Dim objSchemaErrors
  29. Dim objSchemaError
  30. 'Create the MetaUtil object
  31. Set objMetaUtil = Server.CreateObject("MSWC.MetaUtil.1")
  32. 'Check the schema of "LM"
  33. Response.Write("<FONT SIZE=+1>Check the schema of ""LM"" </FONT><br>" & CRLF)
  34. Set objSchemaErrors = objMetaUtil.CheckSchema("LM")
  35. 'Enumerate and display the errors
  36. Response.Write("Enumerate the errors:<br>" & CRLF)
  37. For Each objSchemaError In objSchemaErrors
  38. DisplayCheckError objSchemaError
  39. Response.Write("<br>" & CRLF)
  40. Next
  41. Response.Write("<br>" & CRLF)
  42. Response.Write("Done<br>")
  43. 'Clean up the reference to IIS.MetaUtil
  44. Session.Abandon
  45. %>
  46. </BODY>
  47. </HTML>