【发布时间】:2011-04-06 04:22:39
【问题描述】:
我正在使用 IIS 6。 我需要确定某个站点是在http还是https下运行。
我尝试使用“DirectoryEntry”从以下位置提取所有属性:IIS://localhost/W3SVC/1(1 是本示例中的站点 ID)
以下是结果。 如果有人知道使用“DirectoryEntry”以编程方式确定 IIS6 协议类型的任何其他方式 - 请告诉我
访问标志 = 513 应用隔离 = 2 KeyType = IIsWebVirtualDir 路径 = c:\inetpub\wwwroot AppRoot = /LM/W3SVC/1/ROOT AppFriendlyName = 默认应用程序 DefaultDoc = Default.htm,Default.asp,index.htm,iisstart.asp AnonymousPasswordSync = True 目录浏览标志 = 1073741886 CacheISAPI = 真 CGI超时 = 300 授权标志 = 1 内容索引 = 真 AspLogErrorRequests = True AspScriptFileCacheSize = 250 AspScriptEngineCacheMax = 125 AspExceptionCatchEnable = True AspTrackThreadingModel = False AspAllowOutOfProcComponents = True AspEnableAspHtmlFallback = False AspEnableChunkedEncoding = True AspEnableTypelibCache = True AspErrorsToNTLog = 假 AspProcessorThreadMax = 25 AspRequestQueueMax = 3000 AspMaxDiskTemplateCacheFiles = 1000 AspAllowSessionState = 真 AspBufferingOn = 真 AspEnableParentPaths = True AspSessionTimeout = 20 AspQueueTimeout = -1 AspCodepage = 0 AspScriptTimeout = 90 AspScriptErrorSentToBrowser = True AppAllowDebugging = False AppAllowClientDebug = False AspKeepSessionIDSecure = False AspEnableApplicationRestart = True AspQueueConnectionTestTime = 3 AspSessionMax = -1 AspLCID = 2048 匿名用户名 = IUSR_MASTER AspScriptLanguage = VBScript AspScriptErrorMessage = 处理 URL 时服务器发生错误。请联系系统管理员。 AnonymousUserPass = wl60A8PT[Cp@hE AspDiskTemplateCacheDirectory = %windir%\system32\inetsrv\ASP 编译模板 HttpCustomHeaders = X-Powered-By: ASP.NET KeyType = IIsCertMapper这些可以告诉我协议是 Http 还是 Https? 如果没有...有谁知道如何在 IIS 6 上使用 C# 检查它?
【问题讨论】:
-
“跑步”是什么意思?我的站点可以同时具有 http 和 https 绑定。