So for my Sitecore site I am trying to make it so the user is logged in and can not use the extranet\Annoymous account. I have read and tried
Implementing Sitecore Extranet login on a website
But I missed something, the asp forms authentication has side issues that it returns you to the original page and thus ignoring the user's option of Desktop or Page Editor.
The part where I am frustrated is that it seems this logic is already built into SiteCore. For example if I try to go to http://site/sitecore/shell and I am not logged in site core redirects me to the login page. So how can I turn this on for my entire site.
UPDATE
My Security Editor looks like this
Even if I unprotect the sitecore object and deny access to the main object
I can still get to the site.
In the web.config my Sites section looks like this
<sites>
<site name="shell" virtualFolder="/sitecore/shell" physicalFolder="/sitecore/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" loginPage="/sitecore/login" content="master" contentStartItem="/Base" enableWorkflow="true" enableAnalytics="false" analyticsDefinitions="content" xmlControlPage="/sitecore/shell/default.aspx" browserTitle="International" htmlCacheSize="2MB" registryCacheSize="3MB" viewStateCacheSize="200KB" xslCacheSize="5MB" disableBrowserCaching="true" />
<site name="login" virtualFolder="/sitecore/login" physicalFolder="/sitecore/login" enableAnalytics="false" database="core" domain="sitecore" disableXmlControls="true" />
<site name="admin" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableAnalytics="false" enableWorkflow="true" domain="sitecore" loginPage="/sitecore/admin/login.aspx" />
<site name="service" virtualFolder="/sitecore/service" physicalFolder="/sitecore/service" />
<site name="modules_shell" virtualFolder="/sitecore modules/shell" physicalFolder="/sitecore modules/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" content="master" enableAnalytics="false" enableWorkflow="true" />
<site name="modules_website" virtualFolder="/sitecore modules/web" physicalFolder="/sitecore modules/web" rootPath="/sitecore/content" startItem="/home" language="en" database="web" domain="extranet" allowDebug="true" cacheHtml="true" />
<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/Base" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" loginPage="/sitecore/login/Default.aspx" />
<site name="scheduler" enableAnalytics="false" domain="sitecore" cacheMedia="false" />
<site name="system" enableAnalytics="false" domain="sitecore" />
<site name="publisher" domain="sitecore" enableAnalytics="false" enableWorkflow="true" />
</sites>
I know who I am logged in as because I added this to my homepage
<asp:Label ID="Id" runat="server"><%=HttpContext.Current.User.Identity.Name%></asp:Label>
The solution was to add
requireLogin="true"
to the site "website" tag
<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/Base" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" requireLogin="true" loginPage="/sitecore/login/Default.aspx" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With