I'm using IIS 6. I need to determine whether a certain site is running under http or https.
I tried extracting all of the properties using 'DirectoryEntry' from: IIS://localhost/W3SVC/1 (1 is the site id in this example)
The following are the results. If anyone knows of any other way of determining IIS6 protocol type programmatically, using 'DirectoryEntry' - please let me know
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[Cp@hE AspDiskTemplateCacheDirectory = %windir%\system32\inetsrv\ASP Compiled Templates HttpCustomHeaders = X-Powered-By: ASP.NET KeyType = IIsCertMapper
Can any of these tell me if the protocol is Http or Https? If not... does anyone know how to check it using C# on IIS 6?