Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / May 2008

Tip: Looking for answers? Try searching our database.

Enterprise Library Exception: The configuration section for Logging cannot be found in the configuration source.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jess Chadwick - 28 Sep 2006 19:07 GMT
Hi,

I am getting the following exception when attempting to open a site with
using the Enterprise Library Logging block:
The configuration section for Logging cannot be found in the configuration
source.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationErrorsException: The
configuration section for Logging cannot be found in the configuration
source.

This happens in my test environment that is using the same exact
configuration as my development environment, where it works great...  Any
ideas?

Thanks,
Jess
Steven Cheng[MSFT] - 29 Sep 2006 06:21 GMT
Hello Jess,

From your description, I understand you're receiving an "The onfiguration
section for Logging cannot be found in the configuration source" exception
when try starting an ASP.NET application which use the enterprise library,
correct?

As for the enterprise library component, are you using the entlib 2005(.net
1.1) or entlib 2006(.net 2.0) version?  For the 2005 version, it will use
separate configuration file for each application blocks in it while for
2006(.net 2.0) version, the enterprise library has centralized most
settings in the application's configuration file(app.config file or
web.config file for ASP.NET application). If you're using 1.1 version, you
need to check whether the main configuration sections in
app.config(web.config) and those separate configuration files(for each
application block) is correctly copied to the target place(or whether the
content is identical to the orignial one).   If you're using 2.0 version,
normally you just need to check the main app.config(web.config) for the
enterprise library specific configuration settings.

As for the host appliation, is it a normal .net desktop(winform or console)
application or ASP.NET web aplication. If it is an ASP.NET web application
and hosted in IIS virtual directory, you also need to take care of the
virtual directory hierarchy of your application. This is because ASP.NET's
configuration section is hierarchyically inherited. Sub virtual directory
will inherit web.config setting super level directory.  You can compare the
directory structure between the development server and test server to see
whether there is any difference on this also.

In addition, if convenient, I would suggest you try creating a simplified
project (exclude some non-related code and content) which can reproduct the
same error so that we can concentrate our troubleshooting on tha simplified
one. You can also send such a test project to me so that I can also help
perform some test on my side.

Please feel free to let me know if there is anything we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
Arash Malek - 24 Feb 2007 13:54 GMT
Hi Steven,

I have the same exception when VS form designer try to load my form.

I have a Windows application with a user control. I put an instance of my
user control on main form(form1).
my user control has a public property wich use Logger class in its Setter
method.

when I run my application every thing is OK.(i prove my App.config is ok).
but when i try to open form1 in design time, I get the following exception
and designer is not able to show my form!!!

"The onfiguration  section for Logging cannot be found in the configuration
source"

I make a simple application which shows this bug and i can send it for you
if it could be useful.

regards,
Arash Malek

> Hello Jess,
>
[quoted text clipped - 66 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
swathi vaka - 13 Jun 2007 06:32 GMT
Hi Arash,
    I am also facing the same problem...
    If u get the answer could please let me know

 Thnaks in advance,
 Swathi
Vijay Modi - 12 May 2008 16:55 GMT
Hi,

You can find the solution on the followng path:

http://vijaymodi.wordpress.com/2008/05/12/biztalk-the-configuration-sect
ion-for-logging-cannot-be-found-in-the-configuration-source/

Regards,
Vijay Modi
Troy Fruetel - 09 Nov 2006 18:07 GMT
I'm having the same problem with a C# 2005 Class Library project.  I will send a simple test project with unit test as an example.
Troy Fruetel - 09 Nov 2006 19:09 GMT
Never mind...I just found out that the unit test project needs to have the
app.config file just like the actual class.  The class had no problem logging
unless it was called from the unit test

> I'm having the same problem with a C# 2005 Class Library project.  I will send a simple test project with unit test as an example.
phillip - 28 Nov 2006 19:18 GMT
Hey Troy,
Thanks for posting this.  I had the exact same problem and when I fixed my
app.config of my unit test project to match that of my business tier project,
it worked!  Kudos!

Phillip

> Never mind...I just found out that the unit test project needs to have the
> app.config file just like the actual class.  The class had no problem logging
> unless it was called from the unit test
>
> > I'm having the same problem with a C# 2005 Class Library project.  I will send a simple test project with unit test as an example.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.