Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Kentico + sub site interaction problem due to web.config configSections and EnterpriseLibrary version View modes: 
User avatar
Member
Member
Willy - 7/21/2011 1:22:06 AM
   
Kentico + sub site interaction problem due to web.config configSections and EnterpriseLibrary version
Hi

I currently have a Kentico CMS 5.5 R2 installed, and within that, I have a normal ASP.NET application as a sub site.
I am upgrading my ASP.NET application: .NET framework 2.0 to .NET framework 4.0 and EnterpriseLibrary 3.1 to EnterpriseLibrary 5.0
Once installed, I keep getting problems with my web.config. I found out that Kentico’s web.config is using Enterprise Library 3.1, and hence there is a conflict in the web.config in the configSections:
Kentico uses <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
ASP.NET application uses <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true"/>

How do I fix this problem? Location tag does not work in configSections. Clear and Remove tags don’t help either in configSections. If I were to reinstall Kentico CMS with .Net framework 4.0 selected in the web installer, will the web.config file of Kentico CMS change to using EnterpriseLibrary5.0 ? or I have to change my asp.net application to use EnterpriseLibary 3.1 as well , so that both Kentico and application end up using the same dll, and hence, avoid the configSections mismatch isse.

Any help is appreciated!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 7/21/2011 11:23:13 AM
   
RE:Kentico + sub site interaction problem due to web.config configSections and EnterpriseLibrary version
Hello,

I've searched for the mentioned definition in our default web.config files definition and I couldn't find anything. I've searched for it in 3.1a, 4.0, 4.1, 5.0, 5.5 and 5.5R2 installations on .net 2.0, 3.5 and 4.0 where available.
Could you please double check if this line wasn't added by some developer of yours?

Best regards,
Boris Pocatko

User avatar
Member
Member
Willy - 7/25/2011 12:23:29 AM
   
RE:Kentico + sub site interaction problem due to web.config configSections and EnterpriseLibrary version
Hi Boris,

Thank you for searching through the default web.config files! Your guess was correct. Turns out that our CMS developer had to put in those config settings so that Kentico can access some shared functionality in our child ASP.NET application.

So now I have just changed the config settings in my new Kentico setup to match with the new Enterpise Library settings in my child ASP.NET application, and so far, this works correctly. As you mention that this is not a Kentico issue, if I do face further problems with these new settings, I know that I need to look into the code that we wrote to extend Kentico.