I'm having a strange issue on Sitecore 8.2.
I'm building an IEnuberable<SiteInfo>
like this:
sites = SiteManager.GetSites().Select(s => new SiteInfo(s.Properties)).ToList();
What's interesting is that if I inspect the hostname attribute for the website definition on the s.Properties I do see at debug time that the hostname value has the value I have set on the configuration file. in other words it is getting the value from the configuration file but when it is instantiating the SiteInfo the hostname becomes empty. That only happens for the website definition. I have other sites which I tested and they do show the hostname property correctly.
I do see the right hostname defined on the show config page which matches to this:
<site name="website" enableTracking="true" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/brands/clientname" startItem="/home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="50MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="25MB" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" cacheRenderingParameters="true" renderingParametersCacheSize="10MB" language="en" patch:source="Client.Brands.ClientName.Project.ClientName.config" itemwebapi.mode="Off" itemwebapi.access="ReadOnly" itemwebapi.allowanonymousaccess="false" enableItemLanguageFallback="false" enableFieldLanguageFallback="false" hostname="clientname.dev.local|local.clientname.com"/>
any thoughts on what I might be missing?