My Site nodeconfiguration looks like this:
<site name="sitename" patch:after="site[@name='web_module'] targetHostName="HostName"
database="web"
virtualFolder="/"
physicalFolder="/"
rootPath="RootPath"
startItem="/Home"
dictionaryPath="DictionaryPath"
dictionaryAutoCreate="false"
placeholderSettingsRoot="PlaceholderSettingsRootPath"
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"
formsRoot="formsRootGUID"
loginPage="/login"
enableItemLanguageFallback="true" />
However if I use the Sitecore.Context.DatabaseSitecore.Context.Database
to get the context to get items, it returns master instead of web in sc_mode=normalsc_mode=normal
.
Sitecore.Data.Database context = Sitecore.Context.Database;
Why is it so and what could possibly go wrong?
Thanks!