我使用IIS 6. 我需要确定某个站点是在http还是https下运行。确定网站的协议
我尝试使用“的DirectoryEntry”从提取的所有属性:IIS://本地主机/ SVC/1(1是该示例中的网站ID)
下面是结果。 如果有人知道的确定IIS6协议类型编程的任何其他方式使用“的DirectoryEntry” - 请让我知道
AccessFlags = 513 AppIsolated = 2 KeyType = IIsWebVirtualDir Path = c:\inetpub\wwwroot AppRoot = /LM/W3SVC/1/ROOT AppFriendlyName = Default Application DefaultDoc = Default.htm,Default.asp,index.htm,iisstart.asp AnonymousPasswordSync = True DirBrowseFlags = 1073741886 CacheISAPI = True CGITimeout = 300 AuthFlags = 1 ContentIndexed = True AspLogErrorRequests = True AspScriptFileCacheSize = 250 AspScriptEngineCacheMax = 125 AspExceptionCatchEnable = True AspTrackThreadingModel = False AspAllowOutOfProcComponents = True AspEnableAspHtmlFallback = False AspEnableChunkedEncoding = True AspEnableTypelibCache = True AspErrorsToNTLog = False AspProcessorThreadMax = 25 AspRequestQueueMax = 3000 AspMaxDiskTemplateCacheFiles = 1000 AspAllowSessionState = True AspBufferingOn = True 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 AnonymousUserName = IUSR_MASTER AspScriptLanguage = VBScript AspScriptErrorMessage = An error occurred on the server when processing the URL. Please contact the system administrator. AnonymousUserPass = wl60A8PT[[email protected] AspDiskTemplateCacheDirectory = %windir%\system32\inetsrv\ASP Compiled Templates HttpCustomHeaders = X-Powered-By: ASP.NET KeyType = IIsCertMapper
任何一个可以告诉我,如果该协议是HTTP或HTTPS? 如果不是......有人知道如何使用C#在IIS 6上检查它吗?
你是什么意思'跑?'我的网站可能有http和https绑定。 – ScottE 2010-09-10 18:31:50