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.

922 lines
59 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name :
  4. tables.cpp
  5. Abstract:
  6. mapping tables to convert various info between text and binary
  7. Environment:
  8. Win32 User Mode
  9. Author:
  10. jaroslad (jan 1997)
  11. --*/
  12. #include "tables.h"
  13. #include <string.h>
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. #include <iiscnfgp.h> //get MD_* constants
  17. BOOL IsNumber(const CString & name)
  18. {
  19. for(INT i=0;i<name.GetLength();i++)
  20. {
  21. if (name[i]<_T('0') || name[i]>_T('9'))
  22. return FALSE;
  23. }
  24. return TRUE;
  25. }
  26. BOOL IsServiceName(const CString& name)
  27. {
  28. BOOL fRetval=FALSE;
  29. if(name.CompareNoCase(_T("W3SVC"))==0 || name.CompareNoCase(_T("MSFTPSVC"))==0 ||
  30. name.CompareNoCase(_T("NNTPSVC"))==0 || name.CompareNoCase(_T("SMTPSVC"))==0)
  31. {
  32. fRetval=TRUE;
  33. }
  34. return fRetval;
  35. }
  36. //**********************************************************************
  37. // COMMAND NAME TABLE IMPLEMENTATION
  38. //**********************************************************************
  39. //constants defined in tables.h
  40. struct tCommandNameTable gCommandNameTable[]=
  41. {
  42. {CMD_SET, _T("SET")},
  43. {CMD_GET, _T("GET")},
  44. {CMD_GET, _T("G")},
  45. {CMD_COPY, _T("COPY")},
  46. {CMD_DELETE, _T("DELETE")},
  47. {CMD_DELETE, _T("DEL")},
  48. {CMD_ENUM, _T("ENUM")},
  49. {CMD_ENUM, _T("E")},
  50. {CMD_ENUM_ALL,_T("ENUM_ALL")},
  51. {CMD_CREATE, _T("CREATE")},
  52. {CMD_RENAME, _T("RENAME")},
  53. {CMD_SCRIPT, _T("SCRIPT")},
  54. {CMD_SAVE, _T("SAVE")},
  55. {CMD_APPCREATEINPROC, _T("APPCREATEINPROC")},
  56. {CMD_APPCREATEOUTPOOL, _T("APPCREATEOUTPOOL")},
  57. {CMD_APPCREATEOUTPROC, _T("APPCREATEOUTPROC")},
  58. {CMD_APPDELETE, _T("APPDELETE")},
  59. {CMD_APPRENAME, _T("APPRENAME")},
  60. {CMD_APPUNLOAD, _T("APPUNLOAD")},
  61. {CMD_APPGETSTATUS, _T("APPGETSTATUS")},
  62. //the end
  63. {0,0}
  64. };
  65. DWORD MapCommandNameToCode(const CString & strName)
  66. {
  67. return tCommandNameTable::MapNameToCode(strName);
  68. }
  69. DWORD tCommandNameTable::MapNameToCode(const CString & strName, tCommandNameTable * CommandNameTable)
  70. {
  71. for(int i=0; CommandNameTable[i].lpszName!=0;i++)
  72. {
  73. if(strName.CompareNoCase(CommandNameTable[i].lpszName)==0)
  74. return CommandNameTable[i].dwCode;
  75. }
  76. return NAME_NOT_FOUND;
  77. }
  78. #if 0
  79. CString tCommandNameTable::MapCodeToName(DWORD dwCode, tCommandNameTable * CommandNameTable)
  80. {
  81. for(int i=0; CommandNameTable[i].lpszName!=0;i++)
  82. {
  83. if(dwCode==CommandNameTable[i].dwCode)
  84. return CommandNameTable[i].dwName;
  85. }
  86. return 0;
  87. }
  88. #endif
  89. //**********************************************************************
  90. // PROPERTY NAME TABLE IMPLEMENTATION
  91. //**********************************************************************
  92. #define MD_USE_HOST_NAME (IIS_MD_HTTP_BASE+66 )
  93. #define MD_NET_LOGON_WKS (IIS_MD_HTTP_BASE+65 )
  94. tPropertyNameTable gPropertyNameTable[]=
  95. {
  96. // These are global to all services and should only be set at
  97. // the IIS root
  98. {/**/MD_MAX_BANDWIDTH ,_T("MaxBandwidth"), METADATA_NO_ATTRIBUTES, /*SHOULD BE GLOBAL*/IIS_MD_UT_SERVER, DWORD_METADATA},
  99. {/**/MD_KEY_TYPE ,_T("KeyType"), METADATA_NO_ATTRIBUTES, /*SHOULD BE GLOBAL*/IIS_MD_UT_SERVER, STRING_METADATA},
  100. // These properties are applicable to both HTTP and FTP virtual
  101. // servers
  102. {/**/MD_CONNECTION_TIMEOUT ,_T("ConnectionTimeout"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  103. {/**/MD_MAX_CONNECTIONS ,_T("MaxConnections"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  104. {/**/MD_SERVER_COMMENT ,_T("ServerComment"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, STRING_METADATA},
  105. {/**/MD_SERVER_STATE ,_T("ServerState"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  106. {/**/MD_SERVER_COMMAND ,_T("ServerCommand"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  107. {/**/MD_SERVER_AUTOSTART ,_T("ServerAutostart"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  108. {/**/MD_CLUSTER_SERVER_COMMAND ,_T("ClusterServerCommand"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  109. {/**/MD_CLUSTER_ENABLED ,_T("ClusterEnabled"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  110. {/**/MD_SERVER_SIZE ,_T("ServerSize"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  111. {/**/MD_SERVER_LISTEN_BACKLOG ,_T("ServerListenBacklog"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  112. {/**/MD_SERVER_LISTEN_TIMEOUT ,_T("ServerListenTimeout"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  113. {/**/MD_DOWNLEVEL_ADMIN_INSTANCE ,_T("DownlevelAdminInstance"), METADATA_INHERIT , IIS_MD_UT_SERVER, DWORD_METADATA},
  114. {/**/MD_SERVER_BINDINGS ,_T("ServerBindings"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  115. { MD_SERVER_CONFIGURATION_INFO , _T("ServerConfigurationInfo"),METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  116. //internals
  117. {/**/MD_SERVER_PLATFORM ,_T("ServerPlatform"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  118. {/**/MD_SERVER_VERSION_MAJOR ,_T("MajorVersion"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  119. {/**/MD_SERVER_VERSION_MINOR ,_T("MinorVersion"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  120. {/**/MD_SERVER_CAPABILITIES ,_T("Capabilities"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  121. // These properties are specific to HTTP and belong to the virtual
  122. // server
  123. {/**/MD_SECURE_BINDINGS ,_T("SecureBindings"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  124. {/**/MD_NTAUTHENTICATION_PROVIDERS ,_T("NTAuthenticationProviders"), METADATA_INHERIT, IIS_MD_UT_FILE,/*??*/STRING_METADATA},
  125. {/**/MD_SCRIPT_TIMEOUT ,_T("ScriptTimeout"), METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  126. {/**/MD_CACHE_EXTENSIONS ,_T("CacheExtensions"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,/*??*/DWORD_METADATA},
  127. {/**/MD_CREATE_PROCESS_AS_USER ,_T("CreateProcessAsUser"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  128. {/**/MD_CREATE_PROC_NEW_CONSOLE ,_T("CreateProcNewConsole"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  129. {/**/MD_POOL_IDC_TIMEOUT ,_T("PoolIDCTimeout"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  130. {/**/MD_ALLOW_KEEPALIVES ,_T("AllowKeepAlives"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  131. {/**/MD_FILTER_LOAD_ORDER ,_T("FilterLoadOrder"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,/*??*/STRING_METADATA},
  132. {/**/MD_FILTER_IMAGE_PATH ,_T("FilterImagePath"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  133. {/**/MD_FILTER_STATE ,_T("FilterState"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  134. {MD_FILTER_ENABLED ,_T("FilterEnabled"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  135. {MD_FILTER_FLAGS ,_T("FilterFlags"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  136. {MD_FILTER_DESCRIPTION ,_T("FilterDescription"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  137. { MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS, _T("AllowPathInfoForScriptMappings"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA },
  138. { MD_AUTH_CHANGE_URL ,_T("AuthChangeUrl"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  139. {MD_AUTH_EXPIRED_URL, _T("AuthExpiredUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  140. {MD_AUTH_NOTIFY_PWD_EXP_URL, _T("NotifyPwdExpUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  141. {MD_AUTH_EXPIRED_UNSECUREURL, _T("AuthExpiredUnsecureUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  142. {MD_AUTH_NOTIFY_PWD_EXP_UNSECUREURL, _T("NotifyPwdExpUnsecureUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  143. {MD_ADV_NOTIFY_PWD_EXP_IN_DAYS, _T("NotifyPwdExpInDays"), METADATA_INHERIT,IIS_MD_UT_SERVER,DWORD_METADATA},
  144. {MD_AUTH_CHANGE_FLAGS, _T("AuthChangeFlags"), METADATA_INHERIT,IIS_MD_UT_SERVER,DWORD_METADATA},
  145. {MD_ADV_CACHE_TTL, _T("AdvCacheTTL"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  146. {MD_NET_LOGON_WKS, _T("NetLogonWks"),METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  147. {MD_USE_HOST_NAME, _T("UseHostName"),METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  148. #if defined(CAL_ENABLED)
  149. #define MD_CAL_VC_PER_CONNECT (IIS_MD_HTTP_BASE+130)
  150. #define MD_CAL_AUTH_RESERVE_TIMEOUT (IIS_MD_HTTP_BASE+131)
  151. #define MD_CAL_SSL_RESERVE_TIMEOUT (IIS_MD_HTTP_BASE+132)
  152. #define MD_CAL_W3_ERROR (IIS_MD_HTTP_BASE+133)
  153. {MD_CAL_VC_PER_CONNECT, "CalVcPerConnect",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  154. {MD_CAL_AUTH_RESERVE_TIMEOUT, "CalAuthReserveTimeout",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  155. {MD_CAL_SSL_RESERVE_TIMEOUT, "CalSslReserveTimeout",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  156. {MD_CAL_W3_ERROR, "CalW3Error",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  157. #endif
  158. { MD_IN_PROCESS_ISAPI_APPS , _T("InProcessIsapiApps"), METADATA_INHERIT, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  159. { MD_CUSTOM_ERROR_DESC , _T("CustomErrorDesc"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  160. {/**/MD_MAPCERT ,_T("MapCert"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  161. {/**/MD_MAPNTACCT ,_T("MaPNTAccT"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  162. {/**/MD_MAPNAME ,_T("MapName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  163. {/**/MD_MAPENABLED ,_T("MapEnabled"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  164. {/**/MD_MAPREALM ,_T("MapRealm"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  165. {/**/MD_MAPPWD ,_T("MapPwd"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  166. {/**/MD_ITACCT ,_T("ITACCT"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  167. {/**/MD_CPP_CERT11 ,_T("CppCert11"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  168. {/**/MD_SERIAL_CERT11 ,_T("SerialCert11"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  169. {/**/MD_CPP_CERTW ,_T("CppCertw"), METADATA_SECURE,IIS_MD_UT_SERVER, BINARY_METADATA},
  170. {/**/MD_SERIAL_CERTW ,_T("SerialCertw"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  171. {/**/MD_CPP_DIGEST ,_T("CppDigest"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  172. {/**/MD_SERIAL_DIGEST ,_T("SerialDigest"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  173. {/**/MD_CPP_ITA ,_T("CppIta"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  174. {/**/MD_SERIAL_ITA ,_T("SerialIta"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  175. // Compression Filter Properties
  176. {/**/MD_HC_COMPRESSION_DIRECTORY ,_T("HcCompressionDirectory"), IIS_MD_UT_SERVER, EXPANDSZ_METADATA},
  177. {/**/MD_HC_CACHE_CONTROL_HEADER ,_T("HcCacheControlHeader"), IIS_MD_UT_SERVER, STRING_METADATA},
  178. {/**/MD_HC_EXPIRES_HEADER ,_T("HcExpiresHeader"), IIS_MD_UT_SERVER, STRING_METADATA},
  179. {/**/MD_HC_DO_DYNAMIC_COMPRESSION ,_T("HcDoDynamicCompression"), IIS_MD_UT_SERVER, DWORD_METADATA},
  180. {/**/MD_HC_DO_STATIC_COMPRESSION ,_T("HcDoStaticCompression"), IIS_MD_UT_SERVER, DWORD_METADATA},
  181. {/**/MD_HC_DO_ON_DEMAND_COMPRESSION ,_T("HcDoOnDemandCompression"), IIS_MD_UT_SERVER, DWORD_METADATA},
  182. {/**/MD_HC_DO_DISK_SPACE_LIMITING ,_T("HcDoDiskSpaceLimiting"), IIS_MD_UT_SERVER, DWORD_METADATA},
  183. {/**/MD_HC_NO_COMPRESSION_FOR_HTTP_10 ,_T("HcNoCompressionForHttp10"), IIS_MD_UT_SERVER, DWORD_METADATA},
  184. {/**/MD_HC_NO_COMPRESSION_FOR_PROXIES ,_T("HcNoCompressionForProxies"), IIS_MD_UT_SERVER, DWORD_METADATA},
  185. {/**/MD_HC_NO_COMPRESSION_FOR_RANGE ,_T("HcNoCompressionForRange"), IIS_MD_UT_SERVER, DWORD_METADATA},
  186. {/**/MD_HC_SEND_CACHE_HEADERS ,_T("HcSendCacheHeaders"), IIS_MD_UT_SERVER, DWORD_METADATA},
  187. {/**/MD_HC_MAX_DISK_SPACE_USAGE ,_T("HcMaxDiskSpaceUsage"), IIS_MD_UT_SERVER, DWORD_METADATA},
  188. {/**/MD_HC_IO_BUFFER_SIZE ,_T("HcIoBufferSize"), IIS_MD_UT_SERVER, DWORD_METADATA},
  189. {/**/MD_HC_COMPRESSION_BUFFER_SIZE ,_T("HcCompressionBufferSize"), IIS_MD_UT_SERVER, DWORD_METADATA},
  190. {/**/MD_HC_MAX_QUEUE_LENGTH ,_T("HcMaxQueueLength"), IIS_MD_UT_SERVER, DWORD_METADATA},
  191. {/**/MD_HC_FILES_DELETED_PER_DISK_FREE ,_T("HcFilesDeletedPerDiskFree"), IIS_MD_UT_SERVER, DWORD_METADATA},
  192. {/**/MD_HC_MIN_FILE_SIZE_FOR_COMP ,_T("HcMinFileSizeForComp"), IIS_MD_UT_SERVER, DWORD_METADATA},
  193. {/**/MD_HC_COMPRESSION_DLL ,_T("HcCompressionDll"), IIS_MD_UT_SERVER, EXPANDSZ_METADATA},
  194. {/**/MD_HC_FILE_EXTENSIONS ,_T("HcFileExtensions"), IIS_MD_UT_SERVER, MULTISZ_METADATA},
  195. {/**/MD_HC_PRIORITY ,_T("HcPriority"), IIS_MD_UT_SERVER, DWORD_METADATA},
  196. {/**/MD_HC_DYNAMIC_COMPRESSION_LEVEL ,_T("HcDynamicCompressionLevel"), IIS_MD_UT_SERVER, DWORD_METADATA},
  197. {/**/MD_HC_ON_DEMAND_COMP_LEVEL ,_T("HcOnDemandCompLevel"), IIS_MD_UT_SERVER, DWORD_METADATA},
  198. {/**/MD_HC_CREATE_FLAGS ,_T("HcCreateFlags"), IIS_MD_UT_SERVER, DWORD_METADATA},
  199. // Job Object Site Properties
  200. #define MD_CPU_LOGGING_MASK (IIS_MD_LOGCUSTOM_BASE+7 )
  201. #define MD_CPU_LIMITS_ENABLED (IIS_MD_HTTP_BASE+143)
  202. #define MD_CPU_LOGGING_INTERVAL (IIS_MD_HTTP_BASE+145)
  203. #define MD_CPU_LOGGING_OPTIONS (IIS_MD_HTTP_BASE+146)
  204. #define MD_CPU_CGI_LIMIT (IIS_MD_HTTP_BASE+148)
  205. #define MD_CPU_LIMIT_LOGEVENT (IIS_MD_HTTP_BASE+149)
  206. #define MD_CPU_LIMIT_PRIORITY (IIS_MD_HTTP_BASE+150)
  207. #define MD_CPU_LIMIT_PROCSTOP (IIS_MD_HTTP_BASE+151)
  208. #define MD_CPU_LIMIT_PAUSE (IIS_MD_HTTP_BASE+152)
  209. {/**/MD_CPU_LIMITS_ENABLED ,_T("CpuLimitsEnabled"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  210. {/**/MD_CPU_RESET_INTERVAL ,_T("CpuResetInterval"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  211. {/**/MD_CPU_LOGGING_INTERVAL ,_T("CpuLoggingInterval"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  212. {/**/MD_CPU_LOGGING_OPTIONS ,_T("CpuLoggingOptions"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  213. {/**/MD_CPU_LOGGING_MASK ,_T("CpuLoggingMask"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  214. {/**/MD_CPU_CGI_LIMIT ,_T("CpuCgiLimit"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  215. {/**/MD_CPU_LIMIT_LOGEVENT ,_T("CpuLimitLogEvent"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  216. {/**/MD_CPU_LIMIT_PRIORITY ,_T("CpuLimitPriority"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  217. {/**/MD_CPU_LIMIT_PROCSTOP ,_T("CpuLimitProcStop"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  218. {/**/MD_CPU_LIMIT_PAUSE ,_T("CpuLimitPause"), METADATA_INHERIT,IIS_MD_UT_SERVER, DWORD_METADATA},
  219. // Job Object per file properties
  220. #define MD_CPU_CGI_ENABLED (IIS_MD_HTTP_BASE+140)
  221. #define MD_CPU_APP_ENABLED (IIS_MD_HTTP_BASE+141)
  222. {/**/MD_CPU_CGI_ENABLED ,_T("CpuCgiEnabled"), METADATA_INHERIT,IIS_MD_UT_FILE, DWORD_METADATA},
  223. {/**/MD_CPU_APP_ENABLED ,_T("CpuAppEnabled"), METADATA_INHERIT,IIS_MD_UT_FILE, DWORD_METADATA},
  224. {/**/MD_CERT_CHECK_MODE ,_T("CertCheckMode"), METADATA_INHERIT,IIS_MD_UT_SERVER,DWORD_METADATA},
  225. // Virtual root properties - note MD_ACCESS_PERM is also generally set at
  226. // the virtual directory. These are used for both HTTP and FTP
  227. {/**/MD_VR_PATH ,_T("VrPath"), METADATA_INHERIT,IIS_MD_UT_FILE,STRING_METADATA},
  228. {/**/MD_VR_USERNAME ,_T("VrUsername"), METADATA_INHERIT,IIS_MD_UT_FILE,STRING_METADATA},
  229. {/**/MD_VR_PASSWORD ,_T("VrPassword") , METADATA_INHERIT|METADATA_SECURE,IIS_MD_UT_FILE, STRING_METADATA},
  230. {/**/MD_VR_ACL ,_T("VrAcl"), METADATA_INHERIT,IIS_MD_UT_FILE,BINARY_METADATA},
  231. // This is used to flag down updated vr entries - Used for migrating vroots
  232. {/**/MD_VR_UPDATE ,_T("VrUpdate"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_FILE,DWORD_METADATA},
  233. // Logging related attributes
  234. {MD_LOG_TYPE ,_T("LogType"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  235. {MD_LOGFILE_DIRECTORY ,_T("LogFileDirectory"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  236. {MD_LOGFILE_PERIOD ,_T("LogFilePeriod"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  237. {MD_LOGFILE_TRUNCATE_SIZE ,_T("LogFileTruncateSize"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  238. {MD_LOGSQL_DATA_SOURCES ,_T("LogSqlDataSources"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  239. {MD_LOGSQL_TABLE_NAME ,_T("LogSqlTableName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  240. {MD_LOGSQL_USER_NAME ,_T("LogSqlUserName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  241. {MD_LOGSQL_PASSWORD ,_T("LogSqlPassword"), METADATA_SECURE,IIS_MD_UT_FILE,DWORD_METADATA},
  242. // {MD_LOG_CLSID ,_T("LogClsid"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  243. // {MD_LOG_STATE ,_T("LogState"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  244. {MD_LOGEXT_FIELD_MASK ,_T("ExtLogFieldMask"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  245. {MD_LOGEXT_FIELD_MASK2 ,_T("ExtLogFieldMask2"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  246. {MD_LOG_PLUGIN_ORDER ,_T("LogPluginOrder"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  247. {MD_LOGFILE_LOCALTIME_ROLLOVER ,_T("LogFileLocaltimeRollover"), METADATA_INHERIT,IIS_MD_UT_SERVER,BINARY_METADATA},
  248. // These are FTP specific properties
  249. {/**/MD_EXIT_MESSAGE ,_T("ExitMessage"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  250. {/**/MD_GREETING_MESSAGE ,_T("GreetingMessage"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,/*!!*/MULTISZ_METADATA},
  251. {/**/MD_MAX_CLIENTS_MESSAGE ,_T("MaxClientsMessage"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  252. {/**/MD_BANNER_MESSAGE ,_T("BannerMessage"), METADATA_INHERIT,IIS_MD_UT_SERVER,MULTISZ_METADATA},
  253. {/**/MD_MSDOS_DIR_OUTPUT ,_T("MSDOSDirOutput"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  254. {/**/MD_ALLOW_ANONYMOUS ,_T("AllowAnonymous"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  255. {/**/MD_ANONYMOUS_ONLY ,_T("AnonymousOnly"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  256. {/**/MD_LOG_ANONYMOUS ,_T("LogAnonymous"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  257. {/**/MD_LOG_NONANONYMOUS ,_T("LogNonAnonymous"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  258. {/**/MD_USER_ISOLATION ,_T("UserIsolationMode"), METADATA_INHERIT,IIS_MD_UT_SERVER,DWORD_METADATA},
  259. {/**/MD_AD_CONNECTIONS_USERNAME ,_T("ActiveDirectoryAccessUser"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  260. {/**/MD_AD_CONNECTIONS_PASSWORD ,_T("ActiveDirectoryAccessPwd"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  261. // These are SSL specific properties
  262. {/**/MD_SSL_PUBLIC_KEY ,_T("SslPublicKey"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  263. {/**/MD_SSL_PRIVATE_KEY ,_T("SslPrivateKey"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  264. {/**/MD_SSL_KEY_PASSWORD ,_T("SslKeyPassword"), METADATA_SECURE,IIS_MD_UT_SERVER,BINARY_METADATA},
  265. {/**/MD_SSL_KEY_REQUEST ,_T("SslKeyRequest"), METADATA_SECURE,IIS_MD_UT_SERVER,BINARY_METADATA},
  266. {/**/MD_SSL_FRIENDLY_NAME ,_T("SslFriendlyName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  267. {/**/MD_SSL_IDENT ,_T("SslIdent"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  268. //FTP specific
  269. {MD_SHOW_4_DIGIT_YEAR ,_T("FtpDirBrowseShowLongDate"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  270. //
  271. // These are server certificate properties
  272. //
  273. {/**/MD_SSL_CERT_HASH ,_T("SslCertHash"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  274. {/**/MD_SSL_CERT_CONTAINER ,_T("SslCertContainer"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  275. {/**/MD_SSL_CERT_PROVIDER ,_T("SslCertProvider"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  276. {/**/MD_SSL_CERT_PROVIDER_TYPE ,_T("SslCertProviderType"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  277. {/**/MD_SSL_CERT_OPEN_FLAGS ,_T("SslCertOpenFlags"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  278. {/**/MD_SSL_CERT_STORE_NAME ,_T("SslCertStoreName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  279. //
  280. // These are Certificate Trust List properties
  281. //
  282. {/**/MD_SSL_CTL_IDENTIFIER ,_T("SslCtlIdentifier"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  283. {/**/MD_SSL_CTL_CONTAINER ,_T("SslCtlContainer"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  284. {/**/MD_SSL_CTL_PROVIDER ,_T("SslCtlProvider"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  285. {/**/MD_SSL_CTL_PROVIDER_TYPE ,_T("SslCtlProviderType"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  286. {/**/MD_SSL_CTL_OPEN_FLAGS ,_T("SslCtlOpenFlags"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  287. {/**/MD_SSL_CTL_STORE_NAME ,_T("SslCtlStoreName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  288. {/**/MD_SSL_CTL_SIGNER_HASH ,_T("SslCtlSignerHash"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  289. //
  290. // Metabase property that defines whether to use DS mapper or not
  291. //
  292. {/**/MD_SSL_USE_DS_MAPPER ,_T("SslUseDSMapper"), METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  293. //
  294. // Metabase property that holds SSL replication information
  295. //
  296. {/**/MD_SSL_REPLICATION_INFO ,_T("SslReplicationInfo"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  297. //
  298. // Metabase properties that are used by the CertWiz ActiveX control, that
  299. // is used for the Certificate/CTL UI management tool
  300. //
  301. {/**/MD_SSL_CERT_ENROLL_HISTORY ,_T("SslCertEnrollHistory"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  302. {/**/MD_SSL_CERT_ENROLL_TIME ,_T("SslCertEnrollTime"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  303. {/**/MD_SSL_CERT_ENROLL_STATE ,_T("SslCertEnrollState"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  304. {/**/MD_SSL_CERT_ENROLL_STATE_ERROR ,_T("SslCertEnrollStateError"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  305. //
  306. // Metabase properties used for Fortezza certificates
  307. //
  308. {/**/MD_SSL_CERT_IS_FORTEZZA ,_T("IsFortezza"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  309. {/**/MD_SSL_CERT_FORTEZZA_PIN ,_T("FortezzaPin"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  310. {/**/MD_SSL_CERT_FORTEZZA_SERIAL_NUMBER ,_T("FortezzaPin"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  311. {/**/MD_SSL_CERT_FORTEZZA_PERSONALITY ,_T("FortezzaPersonality"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  312. {/**/MD_SSL_CERT_FORTEZZA_PROG_PIN ,_T("FortezzaProgPin"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  313. //
  314. // Metabase properties that are used by the CertWiz ActiveX control to keep
  315. // track of the user's entry history, and whether DEBUG is enabled. We keep
  316. // these private properties on a per VS basis.
  317. //
  318. {/**/MD_SSL_CERT_WIZ_DEBUG ,_T("WizDebug"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  319. {/**/MD_SSL_CERT_WIZHIST_SZ_TARGET_CA ,_T("WizhistTargetCA"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  320. {/**/MD_SSL_CERT_WIZHIST_SZ_FILE_NAME_USED_LAST ,_T("WizhistFileNameUsedLast"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  321. {/**/MD_SSL_CERT_WIZHIST_SZ_DN_COMMON_NAME ,_T("WizhistCN"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  322. {/**/MD_SSL_CERT_WIZHIST_SZ_DN_O ,_T("WizhistO"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  323. {/**/MD_SSL_CERT_WIZHIST_SZ_DN_OU ,_T("WizhistOU"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  324. {/**/MD_SSL_CERT_WIZHIST_SZ_DN_C ,_T("WizhistC"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  325. {/**/MD_SSL_CERT_WIZHIST_SZ_DN_L ,_T("WizhistL"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  326. {/**/MD_SSL_CERT_WIZHIST_SZ_DN_S ,_T("WizhistS"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  327. {/**/MD_SSL_CERT_WIZHIST_SZ_USER_NAME ,_T("WizhistUserName"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  328. {/**/MD_SSL_CERT_WIZHIST_SZ_USER_PHONE ,_T("WizhistUserPhone"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  329. {/**/MD_SSL_CERT_WIZHIST_SZ_USER_EMAIL ,_T("WizhistUserEmail"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  330. {/**/MD_SSL_CERT_WIZGUID_ICERTGETCONFIG ,_T("WizguidICERTGETCONFIG"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  331. {/**/MD_SSL_CERT_WIZGUID_ICERTREQUEST ,_T("WizguidICERTREQUEST"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  332. {/**/MD_SSL_CERT_WIZGUID_XENROLL ,_T("WizguidXENROLL"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  333. // File and Directory related properties - these should be added in the
  334. // metabase with a user type of IIS_MD_UT_FILE
  335. {/**/MD_AUTHORIZATION ,_T("Authorization"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  336. {/**/MD_AUTHORIZATION_PERSISTENCE ,_T("AuthorizationPersistence"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  337. {/**/MD_REALM ,_T("Realm"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  338. {/**/MD_HTTP_EXPIRES ,_T("HttpExpires"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  339. {/**/MD_HTTP_PICS ,_T("HtpPics"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  340. {/**/MD_HTTP_CUSTOM ,_T("HttpCustom"), METADATA_INHERIT, IIS_MD_UT_FILE,MULTISZ_METADATA},
  341. {/**/MD_DIRECTORY_BROWSING ,_T("DirectoryBrowsing"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  342. {/**/MD_DEFAULT_LOAD_FILE ,_T("DefaultLoadFile"), METADATA_INHERIT, IIS_MD_UT_FILE,/**/STRING_METADATA},
  343. {MD_CONTENT_NEGOTIATION , _T("ContentNegotiation"), METADATA_INHERIT ,IIS_MD_UT_FILE,DWORD_METADATA},
  344. {/**/MD_CUSTOM_ERROR ,_T("CustomError"), METADATA_INHERIT, IIS_MD_UT_FILE,MULTISZ_METADATA},
  345. {/**/MD_FOOTER_DOCUMENT ,_T("FooterDocument"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  346. /**/{MD_FOOTER_ENABLED ,_T("FooterEnabled"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  347. {MD_HTTP_REDIRECT ,_T("HttpRedirect"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_FILE,STRING_METADATA},
  348. {/**/MD_DEFAULT_LOGON_DOMAIN ,_T("DefaultLogonDomain"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  349. {/**/MD_LOGON_METHOD ,_T("LogonMethod"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  350. {MD_SCRIPT_MAPS ,_T("ScriptMaps"), METADATA_INHERIT,IIS_MD_UT_FILE,MULTISZ_METADATA},
  351. {MD_SCRIPT_TIMEOUT ,_T("ScriptTimeout"), METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  352. {MD_MIME_MAP ,_T("MimeMap"), METADATA_INHERIT,IIS_MD_UT_FILE,MULTISZ_METADATA},
  353. {/**/MD_ACCESS_PERM ,_T("AccessPerm"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  354. {/**/MD_SSL_ACCESS_PERM ,_T("SslAccessPerm"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  355. {MD_IP_SEC ,_T("IpSec") , METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  356. {/**/MD_ANONYMOUS_USER_NAME ,_T("AnonymousUserName"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  357. {/**/MD_ANONYMOUS_PWD ,_T("AnonymousPwd"), METADATA_INHERIT|METADATA_SECURE,IIS_MD_UT_FILE,STRING_METADATA},
  358. {MD_ANONYMOUS_USE_SUBAUTH ,_T("AnonymousUseSubAuth"), METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  359. {/**/MD_DONT_LOG ,_T("DontLOG"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  360. {/**/MD_ADMIN_ACL ,_T("AdminAcl"), METADATA_INHERIT, IIS_MD_UT_FILE,BINARY_METADATA},
  361. {MD_SSI_EXEC_DISABLED ,_T("SSIExecDisabled"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  362. {MD_DO_REVERSE_DNS ,_T("DoReverseDns"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  363. {MD_WIN32_ERROR ,_T("Win32Error"), METADATA_VOLATILE, IIS_MD_UT_SERVER,DWORD_METADATA},
  364. {MD_ALLOW_REPLACE_ON_RENAME ,_T("AllowReplaceOnRename"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  365. {/**/MD_CC_NO_CACHE ,_T("CacheControlNoCache"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  366. {/**/MD_CC_MAX_AGE ,_T("CacheControlMaxAge"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  367. {/**/MD_CC_OTHER ,_T("CacheControlOther"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  368. {MD_FRONTPAGE_WEB ,_T("FrontPageWeb"), METADATA_INHERIT, IIS_MD_UT_SERVER, DWORD_METADATA},
  369. {MD_IS_CONTENT_INDEXED ,_T("IsContentIndexed"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  370. {MD_ISM_ACCESS_CHECK ,_T("IsmAccessCheck"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_FILE, DWORD_METADATA},
  371. ////////ASP and WAM params
  372. { MD_ASP_BUFFERINGON , _T("AspBufferingOn"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  373. { MD_ASP_LOGERRORREQUESTS , _T("AspLogErrorRequests"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  374. { MD_ASP_SCRIPTERRORSSENTTOBROWSER , _T("AspScriptErrorSentToBrowser"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  375. { MD_ASP_SCRIPTERRORMESSAGE , _T("AspScriptErrorMessage"),METADATA_INHERIT, ASP_MD_UT_APP, STRING_METADATA},
  376. { MD_ASP_SCRIPTFILECACHESIZE , _T("AspScriptFileCacheSize"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  377. { MD_ASP_SCRIPTENGINECACHEMAX , _T("AspScriptEngineCacheMax"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  378. { MD_ASP_SCRIPTTIMEOUT , _T("AspScriptTimeout"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  379. { MD_ASP_SESSIONTIMEOUT , _T("AspSessionTimeout"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  380. { MD_ASP_ENABLEPARENTPATHS , _T("AspEnableParentPaths"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  381. { MD_ASP_MEMFREEFACTOR , _T("AspMemFreeFactor"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  382. { MD_ASP_MINUSEDBLOCKS , _T("AspMinUseDblocks"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  383. { MD_ASP_ALLOWSESSIONSTATE , _T("AspAllowSessionState"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  384. { MD_ASP_SCRIPTLANGUAGE , _T("AspScriptLanguage") ,METADATA_INHERIT, ASP_MD_UT_APP, STRING_METADATA},
  385. { MD_ASP_QUEUETIMEOUT , _T("AspQueueTimeout") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  386. //{ MD_ASP_STARTCONNECTIONPOOL , _T("AspStartConnectionPool"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  387. { MD_ASP_ALLOWOUTOFPROCCMPNTS , _T("AspAllowOutOfProcComponents"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  388. { MD_ASP_EXCEPTIONCATCHENABLE , _T("AspExceptionCatchEnable"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  389. { MD_ASP_CODEPAGE , _T("AspCodepage") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  390. { MD_ASP_SCRIPTLANGUAGELIST , _T("AspScriptLanguages") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  391. { MD_ASP_ENABLESERVERDEBUG , _T("AspEnableServerDebug") ,METADATA_INHERIT,ASP_MD_UT_APP, DWORD_METADATA},
  392. { MD_ASP_ENABLECLIENTDEBUG , _T("AspEnableClientDebug") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  393. { MD_ASP_TRACKTHREADINGMODEL , _T("AspTrackThreadingModel") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  394. // new 5.0 ASP params
  395. { MD_ASP_ENABLEASPHTMLFALLBACK , _T("AspEnableAspHTMLFallback") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  396. { MD_ASP_ENABLECHUNKEDENCODING , _T("AspEnableChunkedEncoding") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  397. { MD_ASP_ENABLETYPELIBCACHE , _T("AspEnableTypeLibCache") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  398. { MD_ASP_ERRORSTONTLOG , _T("AspErrorsToNTLog") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  399. { MD_ASP_PROCESSORTHREADMAX , _T("AspProcessorThreadMax") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  400. { MD_ASP_REQEUSTQUEUEMAX , _T("AspRequestQueueMax") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  401. { MD_ASP_ENABLEAPPLICATIONRESTART , _T("AspEnableApplicationRestart") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  402. { MD_ASP_QUEUECONNECTIONTESTTIME , _T("AspQueueConnectionTestTime") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  403. { MD_ASP_SESSIONMAX , _T("AspSessionMax") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  404. { MD_ASP_KEEPSESSIONIDSECURE , _T("AspKeepSessionIDSecure") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  405. #define MD_ASP_THREADGATEENABLED (ASP_MD_SERVER_BASE + 30)
  406. #define MD_ASP_THREADGATETIMESLICE (ASP_MD_SERVER_BASE + 31)
  407. #define MD_ASP_THREADGATESLEEPDELAY (ASP_MD_SERVER_BASE + 32)
  408. #define MD_ASP_THREADGATESLEEPMAX (ASP_MD_SERVER_BASE + 33)
  409. #define MD_ASP_THREADGATELOADLOW (ASP_MD_SERVER_BASE + 34)
  410. #define MD_ASP_THREADGATELOADHIGH (ASP_MD_SERVER_BASE + 35)
  411. // Thread gate params
  412. { MD_ASP_THREADGATEENABLED , _T("AspThreadGateEnabled") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  413. { MD_ASP_THREADGATETIMESLICE , _T("AspThreadGateTimeSlice") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  414. { MD_ASP_THREADGATESLEEPDELAY , _T("AspThreadGateSleepDelay") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  415. { MD_ASP_THREADGATESLEEPMAX , _T("AspThreadGateSleepMax") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  416. { MD_ASP_THREADGATELOADLOW , _T("AspThreadGateLoadLow") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  417. { MD_ASP_THREADGATELOADHIGH , _T("AspThreadGateLoadHigh") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  418. // persist template cache....
  419. { MD_ASP_DISKTEMPLATECACHEDIRECTORY , _T("AspDiskTemplateCacheDirectory"),METADATA_INHERIT, IIS_MD_UT_WAM, EXPANDSZ_METADATA},
  420. { MD_ASP_MAXDISKTEMPLATECACHEFILES , _T("AspMaxDiskTemplateCacheFiles"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  421. { MD_ASP_EXECUTEINMTA , _T("AspExecuteInMTA"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  422. { MD_ASP_LCID , _T("AspLCID") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  423. { MD_ASP_SERVICE_FLAGS , _T("AspAppServiceFlags") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  424. { MD_ASP_SERVICE_FLAG_TRACKER , _T("AspEnableTracker") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  425. { MD_ASP_SERVICE_FLAG_FUSION , _T("AspEnableSxs") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  426. { MD_ASP_SERVICE_FLAG_PARTITIONS , _T("AspUsePartition") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  427. { MD_ASP_SERVICE_PARTITION_ID , _T("AspPartitionID") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  428. //////// WAM params
  429. //{ MD_APP_COMMAND , _T("AppCommand") , METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  430. //{ MD_APP_STATUS , _T("AppStatus") , METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  431. //{ MD_APP_ERRORCODE , _T("AppErrorCode"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  432. { MD_APP_ROOT , _T("AppRoot"), METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  433. { MD_APP_ISOLATED , _T("AppIsolated"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  434. { MD_APP_WAM_CLSID , _T("AppWamClsid"), METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  435. { MD_APP_PACKAGE_ID , _T("AppPackageId"), METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  436. { MD_APP_PACKAGE_NAME , _T("ApPackageName"),METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  437. { MD_APP_LAST_OUTPROC_PID , _T("AppLastOutprocId"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  438. //{ MD_APP_WAM_RUNTIME_FLAG , _T("AppWamRuntimmeFlag"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  439. //{ MD_APP_OOP_CRASH_LIMIT , _T("AppOopCrashLimit"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  440. { MD_VR_NO_CACHE, _T("NoCache"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  441. { MD_ENABLE_URL_AUTHORIZATION, _T("EnableUrlAuthorization"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  442. { MD_URL_AUTHORIZATION_STORE_NAME, _T("UrlAuthorizationStoreName"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  443. { MD_URL_AUTHORIZATION_SCOPE_NAME, _T("UrlAuthorizationScopeName"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  444. {0,0}
  445. };
  446. DWORD MapPropertyNameToCode(const CString & strName)
  447. {
  448. return tPropertyNameTable::MapNameToCode(strName);
  449. }
  450. // function finds the record within given property name table,
  451. // with the name equal to parameter lpszName
  452. tPropertyNameTable * tPropertyNameTable::FindRecord(const CString strName, tPropertyNameTable * PropertyNameTable)
  453. {
  454. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  455. {
  456. if( strName.CompareNoCase(PropertyNameTable[i].lpszName)==0)
  457. return PropertyNameTable+i;
  458. }
  459. return 0;
  460. }
  461. tPropertyNameTable * tPropertyNameTable::FindRecord(DWORD dwCode, tPropertyNameTable * PropertyNameTable)
  462. {
  463. if(dwCode==0)
  464. return NULL;
  465. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  466. {
  467. if( dwCode==PropertyNameTable[i].dwCode)
  468. return PropertyNameTable+i;
  469. }
  470. return 0;
  471. }
  472. DWORD tPropertyNameTable::MapNameToCode(const CString & strName, tPropertyNameTable * PropertyNameTable)
  473. {
  474. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  475. {
  476. if(strName.CompareNoCase(PropertyNameTable[i].lpszName)==0)
  477. return PropertyNameTable[i].dwCode;
  478. }
  479. return NAME_NOT_FOUND;
  480. }
  481. CString tPropertyNameTable::MapCodeToName(DWORD dwCode, tPropertyNameTable * PropertyNameTable)
  482. {
  483. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  484. {
  485. if(dwCode == PropertyNameTable[i].dwCode)
  486. return PropertyNameTable[i].lpszName;
  487. }
  488. return _T("");
  489. }
  490. //**********************************************************************
  491. // PROPERTY ATTRIB NAME TABLE IMPLEMENTATION
  492. //**********************************************************************
  493. //constants defined in imd.h
  494. struct tAttribNameTable gAttribNameTable[]=
  495. {
  496. {METADATA_NO_ATTRIBUTES, _T("NO_ATTRIBUTES")},
  497. {METADATA_INHERIT, _T("INHERIT")},
  498. {METADATA_PARTIAL_PATH, _T("PARTIAL_PATH")},
  499. {METADATA_SECURE,_T("SECURE")},
  500. {METADATA_INSERT_PATH,_T("INSERT_PATH")},
  501. // {METADATA_REFERENCE,_T("REFERENCE")},
  502. // {METADATA_MASTER_ROOT_HANDLE, _T("MASTER_ROOT_HANDLE")},
  503. //the end
  504. {0,0}
  505. };
  506. DWORD MapAttribNameToCode(const CString & strName)
  507. {
  508. return tAttribNameTable::MapNameToCode(strName);
  509. }
  510. DWORD tAttribNameTable::MapNameToCode(const CString& strName, tAttribNameTable * AttribNameTable)
  511. {
  512. for(int i=0; AttribNameTable[i].lpszName!=0;i++)
  513. {
  514. if(strName.CompareNoCase(AttribNameTable[i].lpszName)==0)
  515. return AttribNameTable[i].dwCode;
  516. }
  517. return NAME_NOT_FOUND;
  518. }
  519. //**********************************************************************
  520. // PROPERTY DATA TYPE NAME TABLE MPLEMENTATION
  521. //**********************************************************************
  522. //constants defined in imd.h
  523. tDataTypeNameTable gDataTypeNameTable[]=
  524. {
  525. {DWORD_METADATA, _T("DWORD")},
  526. {STRING_METADATA, _T("STRING")},
  527. {BINARY_METADATA, _T("BINARY")},
  528. {EXPANDSZ_METADATA, _T("EXPANDSZ")},
  529. {MULTISZ_METADATA, _T("MULTISZ")},
  530. //the end
  531. {0,0}
  532. };
  533. DWORD MapDataTypeNameToCode(const CString & strName)
  534. {
  535. return tDataTypeNameTable::MapNameToCode(strName);
  536. }
  537. DWORD tDataTypeNameTable::MapNameToCode(const CString& strName, tDataTypeNameTable * DataTypeNameTable)
  538. {
  539. for(int i=0; DataTypeNameTable[i].lpszName!=0;i++)
  540. {
  541. if(strName.CompareNoCase(DataTypeNameTable[i].lpszName)==0)
  542. return DataTypeNameTable[i].dwCode;
  543. }
  544. return NAME_NOT_FOUND;
  545. }
  546. CString tDataTypeNameTable::MapCodeToName(DWORD a_dwCode, tDataTypeNameTable * DataTypeNameTable)
  547. {
  548. for(int i=0; DataTypeNameTable[i].lpszName!=0;i++)
  549. {
  550. if(a_dwCode==DataTypeNameTable[i].dwCode)
  551. return DataTypeNameTable[i].lpszName;
  552. }
  553. return _T("");
  554. }
  555. //**********************************************************************
  556. // PROPERTY USER TYPE NAME TABLE IMPLEMENTATION
  557. //**********************************************************************
  558. //constants defined in iiscnfg.h
  559. struct tUserTypeNameTable gUserTypeNameTable[]=
  560. {
  561. {IIS_MD_UT_SERVER, _T("UT_SERVER")},
  562. {IIS_MD_UT_FILE, _T("UT_FILE")},
  563. {IIS_MD_UT_WAM, _T("UT_WAM")},
  564. {ASP_MD_UT_APP, _T("UT_APP")},
  565. //the end
  566. {0,0}
  567. };
  568. DWORD MapUserTypeNameToCode(const CString & strName)
  569. {
  570. return tUserTypeNameTable::MapNameToCode(strName);
  571. }
  572. DWORD tUserTypeNameTable::MapNameToCode(const CString& strName, tUserTypeNameTable * UserTypeNameTable)
  573. {
  574. for(int i=0; UserTypeNameTable[i].lpszName!=0;i++)
  575. {
  576. if(strName.CompareNoCase(UserTypeNameTable[i].lpszName)==0)
  577. return UserTypeNameTable[i].dwCode;
  578. }
  579. return NAME_NOT_FOUND;
  580. }
  581. //**********************************************************************
  582. // PROPERTY PREDEFINED VALUES TABLE IMPLEMENTATION
  583. //**********************************************************************
  584. //constants defined in iiscnfg.h
  585. //Predefined values table
  586. struct tValueTable gValueTable[]=
  587. {
  588. // Valid values for MD_AUTHORIZATION
  589. {MD_AUTH_ANONYMOUS ,_T("Anonymous"), MD_AUTHORIZATION},
  590. {MD_AUTH_BASIC ,_T("Basic"), MD_AUTHORIZATION},
  591. {MD_AUTH_NT ,_T("NT"), MD_AUTHORIZATION},
  592. {MD_AUTH_MD5 ,_T("MD5"), MD_AUTHORIZATION},
  593. {MD_AUTH_MAPBASIC ,_T("MapBasic"), MD_AUTHORIZATION},
  594. // Valid values for MD_ACCESS_PERM
  595. {MD_ACCESS_READ ,_T("Read"), MD_ACCESS_PERM},
  596. {MD_ACCESS_WRITE ,_T("Write"), MD_ACCESS_PERM},
  597. {MD_ACCESS_EXECUTE ,_T("Execute"), MD_ACCESS_PERM},
  598. {MD_ACCESS_SSL ,_T("SSL"), MD_ACCESS_PERM},// Require SSL
  599. {MD_ACCESS_NEGO_CERT ,_T("NegoCert"), MD_ACCESS_PERM},// Allow client SSL certs
  600. {MD_ACCESS_REQUIRE_CERT ,_T("RequireCert"),MD_ACCESS_PERM},// Require client SSL certs
  601. {MD_ACCESS_MAP_CERT ,_T("MapCert"),MD_ACCESS_PERM},// Map SSL cert to NT account
  602. {MD_ACCESS_SSL128 ,_T("SSL128"), MD_ACCESS_PERM},// Require 128 bit SSL
  603. {MD_ACCESS_SCRIPT ,_T("Script"), MD_ACCESS_PERM},// Script
  604. {MD_ACCESS_NO_REMOTE_READ ,_T("NoRemoteRead"), MD_ACCESS_PERM},// NO_REMOTE only
  605. {MD_ACCESS_NO_REMOTE_WRITE ,_T("NoRemoteWrite"), MD_ACCESS_PERM},// NO_REMOTE only
  606. {MD_ACCESS_NO_REMOTE_EXECUTE ,_T("NoRemoteExecute"), MD_ACCESS_PERM},// NO_REMOTE only
  607. {MD_ACCESS_NO_REMOTE_SCRIPT ,_T("NoRemoteScript"), MD_ACCESS_PERM},// NO_REMOTE only
  608. {MD_ACCESS_MASK ,_T("MaskAll"), MD_ACCESS_PERM},
  609. // Valid values for MD_SSL_ACCESS_PERM
  610. {MD_ACCESS_READ ,_T("Read"), MD_SSL_ACCESS_PERM},
  611. {MD_ACCESS_WRITE ,_T("Write"), MD_SSL_ACCESS_PERM},
  612. {MD_ACCESS_EXECUTE ,_T("Execute"), MD_SSL_ACCESS_PERM},
  613. {MD_ACCESS_SSL ,_T("SSL"), MD_SSL_ACCESS_PERM},// Require SSL
  614. {MD_ACCESS_NEGO_CERT ,_T("NegoCert"), MD_SSL_ACCESS_PERM},// Allow client SSL certs
  615. {MD_ACCESS_REQUIRE_CERT ,_T("RequireCert"),MD_SSL_ACCESS_PERM},// Require client SSL certs
  616. {MD_ACCESS_MAP_CERT ,_T("MapCert"),MD_SSL_ACCESS_PERM},// Map SSL cert to NT account
  617. {MD_ACCESS_SSL128 ,_T("SSL128"), MD_SSL_ACCESS_PERM},// Require 128 bit SSL
  618. {MD_ACCESS_SCRIPT ,_T("Script"), MD_SSL_ACCESS_PERM},// Script
  619. {MD_ACCESS_NO_REMOTE_READ ,_T("NoRemoteRead"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  620. {MD_ACCESS_NO_REMOTE_WRITE ,_T("NoRemoteWrite"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  621. {MD_ACCESS_NO_REMOTE_EXECUTE ,_T("NoRemoteExecute"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  622. {MD_ACCESS_NO_REMOTE_SCRIPT ,_T("NoRemoteScript"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  623. {MD_ACCESS_MASK ,_T("MaskAll"), MD_SSL_ACCESS_PERM},
  624. // Valid values for MD_DIRECTORY_BROWSING
  625. {MD_DIRBROW_SHOW_DATE ,_T("Date"), MD_DIRECTORY_BROWSING},
  626. {MD_DIRBROW_SHOW_TIME ,_T("Time"), MD_DIRECTORY_BROWSING},
  627. {MD_DIRBROW_SHOW_SIZE ,_T("Size"), MD_DIRECTORY_BROWSING},
  628. {MD_DIRBROW_SHOW_EXTENSION ,_T("Extension"), MD_DIRECTORY_BROWSING},
  629. {MD_DIRBROW_LONG_DATE ,_T("LongDate"), MD_DIRECTORY_BROWSING},
  630. {MD_DIRBROW_ENABLED ,_T("Enabled"), MD_DIRECTORY_BROWSING},// Allow directory browsing
  631. {MD_DIRBROW_LOADDEFAULT ,_T("LoadDefault"),MD_DIRECTORY_BROWSING},// Load default doc if exists
  632. {MD_DIRBROW_MASK ,_T("MaskAll"), MD_DIRECTORY_BROWSING},
  633. // Valid values for MD_LOGON_METHOD
  634. {MD_LOGON_INTERACTIVE ,_T("Interactive"), MD_LOGON_METHOD, tValueTable::TYPE_EXCLUSIVE},
  635. {MD_LOGON_BATCH ,_T("Batch"), MD_LOGON_METHOD, tValueTable::TYPE_EXCLUSIVE},
  636. {MD_LOGON_NETWORK ,_T("Network"), MD_LOGON_METHOD, tValueTable::TYPE_EXCLUSIVE},
  637. // Valid values for MD_FILTER_STATE
  638. {MD_FILTER_STATE_LOADED ,_T("Loaded"), MD_FILTER_STATE, tValueTable::TYPE_EXCLUSIVE},
  639. {MD_FILTER_STATE_UNLOADED ,_T("Unloaded"), MD_FILTER_STATE, tValueTable::TYPE_EXCLUSIVE },
  640. // Valid values for MD_FILTER_FLAGS
  641. {/*SF_NOTIFY_SECURE_PORT*/0x00000001 ,_T("SecurePort"), MD_FILTER_FLAGS},
  642. {/*SF_NOTIFY_NONSECURE_PORT*/0x00000002 ,_T("NonSecurePort"), MD_FILTER_FLAGS},
  643. {/*SF_NOTIFY_READ_RAW_DATA*/0x000008000 ,_T("ReadRawData"), MD_FILTER_FLAGS},
  644. {/*SF_NOTIFY_PREPROC_HEADERS*/0x00004000 ,_T("PreprocHeaders"), MD_FILTER_FLAGS},
  645. {/*SF_NOTIFY_AUTHENTICATION*/0x00002000 ,_T("Authentication"), MD_FILTER_FLAGS},
  646. {/*SF_NOTIFY_URL_MAP*/0x00001000 ,_T("UrlMap"), MD_FILTER_FLAGS},
  647. {/*SF_NOTIFY_ACCESS_DENIED*/0x00000800 ,_T("AccessDenied"), MD_FILTER_FLAGS},
  648. {/*SF_NOTIFY_SEND_RESPONSE*/0x00000040 ,_T("SendResponse"), MD_FILTER_FLAGS},
  649. {/*SF_NOTIFY_SEND_RAW_DATA*/0x00000400 ,_T("SendRawData"), MD_FILTER_FLAGS},
  650. {/*SF_NOTIFY_LOG*/0x00000200 ,_T("NotifyLog"), MD_FILTER_FLAGS},
  651. {/*SF_NOTIFY_END_OF_REQUEST*/0x00000080 ,_T("EndOfRequest"), MD_FILTER_FLAGS},
  652. {/*SF_NOTIFY_END_OF_NET_SESSION*/0x00000100 ,_T("EndOfNetSession"), MD_FILTER_FLAGS},
  653. {/*SF_NOTIFY_AUTHENTICATIONEX*/ 0x20000000 ,_T("AuthenticationX"), MD_FILTER_FLAGS},
  654. {/*SF_NOTIFY_REQUEST_SECURITY_CONTEXT_CLOSE*/0x10000000,_T("RequestSecurityContextClose"), MD_FILTER_FLAGS},
  655. {/*SF_NOTIFY_RENEGOTIATE_CERT*/0x08000000, _T("RenegotiateCert"), MD_FILTER_FLAGS},
  656. {/*SF_NOTIFY_ORDER_HIGH*/0x00080000 ,_T("OrderHigh"), MD_FILTER_FLAGS},
  657. {/*SF_NOTIFY_ORDER_MEDIUM*/0x00040000 ,_T("OrderMedium"), MD_FILTER_FLAGS},
  658. {/*SF_NOTIFY_ORDER_LOW*/0x00020000 ,_T("OrderLow"), MD_FILTER_FLAGS},
  659. // Valid values for MD_SERVER_STATE
  660. {MD_SERVER_STATE_STARTING ,_T("Starting"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  661. {MD_SERVER_STATE_STARTED ,_T("Started"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  662. {MD_SERVER_STATE_STOPPING ,_T("Stopping"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  663. {MD_SERVER_STATE_STOPPED ,_T("Stopped"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  664. {MD_SERVER_STATE_PAUSING ,_T("Pausing"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  665. {MD_SERVER_STATE_PAUSED ,_T("Paused"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  666. {MD_SERVER_STATE_CONTINUING ,_T("Continuing"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  667. // Valid values for MD_SERVER_COMMAND
  668. {MD_SERVER_COMMAND_START ,_T("Start"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  669. {MD_SERVER_COMMAND_STOP ,_T("Stop"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  670. {MD_SERVER_COMMAND_PAUSE ,_T("Pause"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  671. {MD_SERVER_COMMAND_CONTINUE ,_T("Continue"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  672. // Valid values for MD_SERVER_SIZE
  673. {MD_SERVER_SIZE_SMALL ,_T("Small"), MD_SERVER_SIZE, tValueTable::TYPE_EXCLUSIVE},
  674. {MD_SERVER_SIZE_MEDIUM ,_T("Medium"), MD_SERVER_SIZE, tValueTable::TYPE_EXCLUSIVE},
  675. {MD_SERVER_SIZE_LARGE ,_T("Large"), MD_SERVER_SIZE, tValueTable::TYPE_EXCLUSIVE},
  676. // Valid values for MD_USER_ISOLATION
  677. {MD_USER_ISOLATION_NONE ,_T("IsolationDisabled"), MD_USER_ISOLATION, tValueTable::TYPE_EXCLUSIVE},
  678. {MD_USER_ISOLATION_BASIC ,_T("IsolationStandAlone"), MD_USER_ISOLATION, tValueTable::TYPE_EXCLUSIVE},
  679. {MD_USER_ISOLATION_AD ,_T("IsolationUsingAD"), MD_USER_ISOLATION, tValueTable::TYPE_EXCLUSIVE},
  680. // valid values for MD_CERT_CHECK_MODE
  681. {MD_CERT_NO_REVOC_CHECK ,_T("NoRevocCheck"), MD_CERT_CHECK_MODE},
  682. //{APPCMD_NONE, _T("None"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  683. //{APPCMD_VERIFY, _T("Verify"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  684. //{APPCMD_GETSTATUS, _T("GetStatus"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  685. //{APPCMD_CREATE, _T("Create"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  686. //{APPCMD_CREATEINPROC, _T("CreateInProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  687. //{APPCMD_CREATEOUTPROC, _T("CreateOutProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  688. //{APPCMD_CHANGETOINPROC, _T("ChangeToInProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  689. //{APPCMD_CHANGETOOUTPROC, _T("ChangeToOutProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  690. //{APPCMD_DELETE, _T("Delete"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  691. //{APPCMD_UNLOAD, _T("Unload"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  692. //{APPSTATUS_Error, _T("Error"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  693. //{APPSTATUS_Created, _T("Created"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  694. //{APPSTATUS_Deleted, _T("Deleted"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  695. //{APPSTATUS_UnLoaded, _T("Unloaded"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  696. //{APPSTATUS_Killed, _T("Killed"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  697. //{APPSTATUS_Running, _T("Running"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  698. //{APPSTATUS_Stopped, _T("Stopped"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  699. //{APPSTATUS_NoApplication, _T("NoApplication"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  700. //{APPSTATUS_AppSubNode, _T("AppSubNode"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  701. // NEED LOGGING Updates
  702. #if 0
  703. {MD_LOGTYPE_NONE ,_T("LOGTYPE_NONE")},
  704. {MD_LOGTYPE_FILE ,_T("LOGTYPE_FILE")},
  705. {MD_LOGTYPE_ODBC ,_T("LOGTYPE_ODBC")},
  706. {MD_LOGFILE_PERIOD_MAXSIZE ,_T("LOGFILE_PERIOD_MAXSIZE")},
  707. {MD_LOGFILE_PERIOD_DAILY ,_T("LOGFILE_PERIOD_DAILY")},
  708. {MD_LOGFILE_PERIOD_WEEKLY ,_T("LOGFILE_PERIOD_WEEKLY")},
  709. {MD_LOGFILE_PERIOD_MONTHLY ,_T("LOGFILE_PERIOD_MONTHLY")},
  710. #endif
  711. //the end
  712. {0,0}
  713. };
  714. DWORD MapValueNameToCode(const CString & strName,DWORD dwRelatedPropertyCode)
  715. {
  716. return tValueTable::MapNameToCode(strName, dwRelatedPropertyCode);
  717. }
  718. DWORD tValueTable::MapNameToCode(const CString& strName, DWORD dwRelatedPropertyCode, tValueTable * ValueTable)
  719. {
  720. for(int i=0; ValueTable[i].lpszName!=0;i++)
  721. {
  722. if((strName.CompareNoCase(ValueTable[i].lpszName)==0) && ValueTable[i].dwRelatedPropertyCode==dwRelatedPropertyCode)
  723. return ValueTable[i].dwCode;
  724. }
  725. return NAME_NOT_FOUND;
  726. }
  727. CString tValueTable::MapValueContentToString(DWORD dwValueContent, DWORD dwRelatedPropertyCode, tValueTable * ValueTable)
  728. {
  729. CString strResult=_T("");
  730. for(int i=0; ValueTable[i].lpszName!=0;i++)
  731. {
  732. if(ValueTable[i].dwRelatedPropertyCode==dwRelatedPropertyCode)
  733. {
  734. if(ValueTable[i].dwFlags==tValueTable::TYPE_EXCLUSIVE)
  735. {
  736. if (ValueTable[i].dwCode == dwValueContent)
  737. return ValueTable[i].lpszName;
  738. }
  739. else if ((ValueTable[i].dwCode & dwValueContent) == ValueTable[i].dwCode)
  740. {
  741. strResult = strResult + ValueTable[i].lpszName + _T(" ");
  742. }
  743. }
  744. }
  745. strResult.TrimRight();
  746. return strResult;
  747. }
  748. //prints info about what is stored in tables so that user can see the predefined names and values
  749. void PrintTablesInfo(void)
  750. {
  751. //Print supported property names
  752. _tprintf(_T("***The following list of property names (IIS parameters) is supported:\n"));
  753. _tprintf(_T("------------------------------------------------------------------------------\n"));
  754. _tprintf(_T("%-25s: \t%-10s %s\n"),_T("Property Name"), _T("Data type"), _T("Attributes and User Type"));
  755. _tprintf(_T("\t\t--Predefined Values\n"));
  756. _tprintf(_T("------------------------------------------------------------------------------\n"));
  757. for(int i=0; gPropertyNameTable[i].lpszName!=NULL; i++)
  758. {
  759. _tprintf(_T("%-25s: \t%-10s "),gPropertyNameTable[i].lpszName,
  760. LPCTSTR(_T("(")+tDataTypeNameTable::MapCodeToName(gPropertyNameTable[i].dwDefDataType)+_T(")")));
  761. if( (METADATA_INHERIT & gPropertyNameTable[i].dwDefAttributes) == METADATA_INHERIT)
  762. { _tprintf(_T("INHERIT\t"));
  763. }
  764. if( (IIS_MD_UT_SERVER & gPropertyNameTable[i].dwDefUserType) == IIS_MD_UT_SERVER)
  765. { _tprintf(_T("UT_SERVER\t"));
  766. }
  767. if( (IIS_MD_UT_FILE & gPropertyNameTable[i].dwDefUserType) == IIS_MD_UT_FILE)
  768. { _tprintf(_T("UT_FILE "));
  769. }
  770. _tprintf(_T("\n"));
  771. //print list of applicable values
  772. for(int j=0; gValueTable[j].lpszName!=NULL;j++)
  773. {
  774. if( gValueTable[j].dwRelatedPropertyCode==gPropertyNameTable[i].dwCode)
  775. {
  776. _tprintf(_T("\t\t %-15s (=0x%x)\n"),gValueTable[j].lpszName,gValueTable[j].dwCode);
  777. }
  778. }
  779. }
  780. _tprintf(_T("\n***The following list of user types (for IIS parameters) is supported:\n"));
  781. for(i=0; gUserTypeNameTable[i].lpszName!=NULL; i++)
  782. {
  783. _tprintf(_T("%s "),gUserTypeNameTable[i].lpszName);
  784. }
  785. _tprintf(_T("\n\n***The following list of data types (for IIS parameters) is supported:\n"));
  786. for(i=0; gDataTypeNameTable[i].lpszName!=NULL; i++)
  787. {
  788. _tprintf(_T("%s "),gDataTypeNameTable[i].lpszName);
  789. }
  790. _tprintf(_T("\n\n***The following list of attributes (for IIS parameters) is supported:\n"));
  791. for( i=0; gAttribNameTable[i].lpszName!=NULL; i++)
  792. {
  793. _tprintf(_T("%s "),gAttribNameTable[i].lpszName);
  794. }
  795. _tprintf(_T("\n"));
  796. }