Sitecore with Solr – required configuration

In this post I will provide you some information about configuration of your Sitecore for work with Solr server.

Probably everyone who faced with that task, found the most popular and really good guide from sitecore-community.github.io (click).

But there is a one more thing which should be made. About this additional configuration I will write today.

We have to configure our Inversion of Control containers.

When we want to use Sitecore with Solr we have to configure at lease two inversion of control containers to work parallel. (Autofac and Windsor).

So lets do it!

Open your Global.asax.cs file and check your MvcApplication class definition – it should extend a WindsorApplication. So code will look in the following way:

public class MvcApplication : WindsorApplication

Ok, the next step is initialization code for your containers. This code should looks like:

public override void Application_Start()
        {            
            this.Container = (IWindsorContainer)new WindsorContainer();
            new WindsorSolrStartUp(this.Container).Initialize();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
 
            AutofacConfig.RegisterConfiguration();
        }

When you have your application configured in this way you may be sure that Sitecore tools (like administration panel) and communication with Solr server will work properly.

Well and the last but not least thing – check your Global.asax file – code inside it should look like:

<%@ Application Codebehind="Global.asax.cs" Inherits="<PROJECT_NAMESPACE>.MvcApplication" Language="C#" %>​

If you have any questions or problems, do not hesitate to ask or comment bellow the post.

 

Where can I download Sitecore?

Where can I download Sitecore?

Question from the title is very often asked question by everyone who wants to learn Sitecore.

The answer is very simple – you can not just download installer if you do not have Sitecore account with appropriate permissions.

So You probably want to know – how to get the account with appropriate permissions?

The answer is also simple. The only way to have account which has permissions to download Sitecore and Sitecore Modules is get account connected with company which is a Sitecore Partner.

In other words You have to work for someone who is a Sitecore Partner or just be a Sitecore Partner.

When you have appriopriate account you can visit two websites to download Sitecore.

For sitecore 6-7.5 you should visit sdn.sitecore.net

For Sitecore 8.0 – *.* you should visit dev.sitecore.net

Ok I’ve downloaded the Sitecore – can I install it?

No you can not. Sorry. The licence is required.

Licence for Sitecore is a XML file with licence data. You should be able to select path to the licence file during the installation process.

Licence is available to download only from spn.sitecore.net

WFFM – Unlicenced control – Form Designer

When you will notice a following error message inside Form Desinger:

“ComponentArt Grid :: Unlicensed control. Click here for more information”

Which looks in following way:

2016-02-01_11h06_42

You have to know that you probably removed licence file from bin directory. The solution is very easy.

Just copy file “ComponentArt.UIFramework.lic” from sitecore installation zip file and paste it into your instance.

Everything should work.

Error HTTP 401.2 — Unauthorized

If you get error “Error HTTP 401.2 — Unauthorized” you can locally disable authentication in following steps:

Open regedit and go to: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Lsa > MSV1_0

Add multiline key value (“REG_MULTI_SZ”) with name “BackConnectionHostNames”. As value enter hostnames of your IIS applications.

2016-02-23_15h58_23

Inside IIS application in authorization section select ” Windows authentication” and change providers order into following:

  1. NTLM
  2. Negotiate

After these steps your error should be gone.

 

 

Increase size of web.config file

When you need to have a bigger web.config file – for example when you want to use a Sitecore Commerce Server you should do following steps:

  1. Open regedit tool ( inside cmd run “regedit” command )
  2. Find the key HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > InetStp > Configuration ( if key “Configuration” doesn’t exists – just add it )
  3. Add DWORD Value named “MaxWebConfigFileSizeInKB” with value 500

At the end it will look like in bottom image:

2016-02-23_13h58_17