77

The following setup may take some effort, but it will give you proper status codes, as well as "keeping" the requested URL, avoiding superfluous requests between Sitecore and IIS, and allow other processors and modules in your solution to seamlessly return a 404 page if required. It's been my experience that without the following setup, there is ...


75

You can set the "Hidden" file attribute. Sitecore will not patch in any hidden files, even if they have the .config extension. The same is also true for folders, setting the "Hidden" attribute will mean the folder is not processed and the files contained within will not be loaded either. You can find the exact code in LoadAutoIncludeFiles() method in ...


36

Purpose of keepalive.aspx Here's the full code of the page in Sitecore 8.0: <%@Page Language="C#" %> <%@ Import Namespace="Sitecore.Analytics" %> <!DOCTYPE html> <html> <head id="Head1" runat="server" enableviewstate="false"> <title>Keep Alive</title> <script runat="server"> protected override void ...


31

There are several pieces of documentation that are available for this: First is https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/security_hardening This contains a collection of documents relevant to your version of Sitecore. Second is The Security Hardening Guide which is the defacto guide for locking down and securing a ...


28

While the above answers are correct; you should concern yourself with more than just restricting access to the /sitecore folder - there is a very quick and easy way to achieve what you are specifically asking for. Go to "Request Filtering" on your site in IIS. Add "sitecore" as a hidden segment. You have now effectively blocked access to the /sitecore ...


25

With Sitecore 8.2 Initial release, you could open the properties of a Sitecore.Kernel.dll, go to the Details tab, and the "Product Version" field contained the revision number (rev. 160729) that you could look up on this page. Unfortunately, this is no longer an option with 8.2 Update 1 and 8.2 Update 2. So here's the mapping of the Sitecore.Kernel.dll ...


24

For Sitecore 8.1 and later: Per Sitecore documentation, you can run in "CMS-only" mode: To run CMS-only mode, you must set the Xdb.Enabled configuration setting to false in the Sitecore.Xdb.config configuration file. https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/experience_management/experience_management_an_overview ...


22

The <mediaLibrary><mediaTypes> section of Sitecore.config (or web.config in older versions of Sitecore) contains a <mediatype> element for each file type. Within each mediatype element is a <forceDownload> element. The Content-Disposition header will be set according to the value of the forceDownload setting; attachment; for true, ...


22

Maybe you are facing a problem with the SitecoreInstallationFramework version? Sitecore 9.0.X requires 1.2.1: Install-Module -Name SitecoreInstallFramework -RequiredVersion 1.2.1 Sitecore.9.1.0 requires 2.0.0: Install-Module -Name SitecoreInstallFramework -RequiredVersion 2.0.0 Sitecore.9.1.1 requires 2.1.0: Install-Module -Name SitecoreInstallFramework -...


20

This is an addition to Kyles answer. While you can do the full site definition for each site, it quickly becomes cumbersome and really for most of the settings you have the same values. So you can use property inheritance in the patch file. For example if we have 4 sites, we can create the first one with fill definitions, but for the others, we can just ...


19

I actually just discovered the answer to my own question after more poking around. Highlight the item in the Sitecore Content Explorer. From the Analyze ribbon select the Attributes button. In the Attributes dialog box that appears click the Settings tab. There is a "Disable analytics for this page" checkbox on this tab. Check it.


18

You can configure Sitecore to respond to requests with different home nodes based on the url. To do so, you need to perform the following steps: Configure DNS appropriately. Add a binding in IIS for each hostname. Copy or rename the config file App_Config/Include/SiteDefinition.config.example to App_Config/Include/SiteDefinition.config Modify the config ...


18

TDS has a feature named Global Config File that allows you to define the value of any TDS project setting in a centralized manner. Setting up the TdsGlobal.config To start using this feature, right click on the solution and click "Add Global TDS Config file": TDS will add a new folder to your solution, containing the file TdsGlobal.config: In this file, ...


16

The settings are: database=master, filterItems=true and enableWorflow=true. There is an example patch file included in App_Config/Include named LiveMode.config.example. <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <sites> <site name="website"> <patch:attribute name="database">...


16

Edit: February 2020 NuGet package 2.0.0 was released exclusively for Sitecore 9.x support. Full implementation available at https://github.com/jraps20/SitecoreFriendlyErrors Edit: November 2017 The technique described in this answer has been packaged up and added to NuGet: https://www.nuget.org/packages/Sitecore.FriendlyErrors/ ~ ~ ~ Due to the ...


16

Yes there is. Depends on your Sitecore version but you can use: /sitecore/admin/pipelines.aspx Sitecore Pipeline Profiler page The Sitecore Pipeline Profiler page has been in from Sitecore 7 but is disabled by default. You enable by renaming the /App_Config/Include/Sitecore.PipelineProfiling.config.disabled to remove the .disabled extension and setting ...


16

The fix There are invisible characters in the configuration file; this is something that may happen when you copy configuration text directly from a web page. Remove the characters and the issue will be fixed. Here they are, at the end of the line: </initialize>‌ You can make them visible in different ways, but the easiest that has worked for me ...


16

Instead of changing the EXM.Enabled setting, try setting the following to no in your Web.config: <add key="exmEnabled:define" value="no" />


16

We called upon Sitecore Support and they told us this was a "bug". It will be documented but until that is done, you can follow this guide: App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.Remote.Client.config: set role:require on sitecore element to "ContentManagement AND !Reporting" <sitecore role:require="ContentManagement AND !Reporting"> ...


15

Starting from Sitecore 8.1, the settings that disable xDB have changed. The settings are now located in Sitecore.Xdb.config. There are two boolean settings: Xdb.Enabled — if you set this to false, Sitecore will not store any data in MongoDB. Xdb.Tracking.Enabled — if you set this to false, there will be no in-memory tracking of website users and their ...


15

In Sitecore 7.1-7.5 there is a configuration file called Sitecore.Speak.config in the include folder. In that file find the following line: <override xmlControl="Sitecore.Shell.Applications.Media.MediaBrowser" with="/sitecore/client/Sitecore/Common/Dialogs/SelectMediaDialog" /> And replace it with this <override xmlControl="Sitecore.Shell....


15

You would need to use an XmlTransform to do this. If you look at the Habitat demo site you can see examples of how to do this. Creating the transform file You would add your connection string to a ConnectionStrings.config.transform file - this can live in your project in the App_Config folder. The file is a standard config transform file. Example: <?...


14

We do this using an IIS Rewrite Rule like so: <rule name="Block Sitecore Access Rule" stopProcessing="true" xdt:Transform="Insert"> <match url=".*" /> <conditions> <add input="{URL}" pattern="^/sitecore/?.*" /> <add input="{URL}" pattern="^/sitecore/service/?.*" negate="true" /> </conditions> ...


14

The beacon is created by taking a series of scripts and 'bundeling' them together (minifying and caching them). Have a look in App_Config\Include\FXM\Sitecore.FXM.Bundle.config .. this shows all the parts that go into the 'bundeling' process. This is the place you can add or modify any extra scripts you need to be delivered to the client as part of the ...


14

The Sitecore XML configuration has some fairly handy things in it, and ref is one of them. I spent a bit of time playing around with it some time ago; I think that I can provide an answer, but it's quite a long one so buckle in. With 'how it works'... For fine detail, you can investigate the Factory.CreateObject(XmlNode, string[], bool, IFactoryHelper) and ...


14

You can use the Sitecore Config Builder tool which is available on the Marketplace. Select the web.config for the solution and then choose where to save the resulting merged config file. This is the same result as you would see if you browsed to /sitecore/admin/showconfig.aspx but it does not require a working Sitecore instance, just the config files. This ...


14

You can use <patch:delete /> to achieve this. It will look like: <sitecore> <contentSearch> <configuration> <indexes> <index id="xxxxx"> <strategies hint="list:AddStrategy"> <patch:delete /> </strategies> <strategies hint="...


13

For 404 page, for not found files or items, Sitecore has out-of-box setting - <setting name="RequestErrors.UseServerSideRedirect" value="true" /> Make sure, you define your physical 404 page in below setting - <setting name="ItemNotFoundUrl" value="/sitecore/service/notfound.aspx" /> If you have the 404 in Sitecore content tree, you can refer ...


13

Pre Sitecore 8.1 (which splits out the Sitecore node into /App_Config/Sitecore.config) - I generally create my own Sitecore.config and patch that into the web.config in the same way as the connection strings is done. Then yes, I just have the resulting web.config from my Sitecore installation in the web project. With debug transforms for local development. ...


13

I will recommend these specific settings for Sitecore in IIS: Ensure that Maximum Worker Processes for the Application Pool is set to 1 (under advanced settings) Ensure that Load User Profile settings of the Application Pool is set to "true" (under advanced settings) Ensure anonymous access is denied for: /App_Config /sitecore/admin /sitecore/debug /...


Only top voted, non community-wiki answers of a minimum length are eligible