Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9167053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:17:48+00:00 2026-06-17T15:17:48+00:00

I started getting this error when logging using the MS Enterprise Library Logger. The

  • 0

I started getting this error when logging using the MS Enterprise Library Logger.

The logging mechanism works my queuing the log entries and then using the timer to flush the entries every 10 seconds.

It was working fine for a while, but today this error started to appear:

Line of code:

Logger.Write(list[i]);

Error Message:

Object synchronization method was called from an unsynchronized block of code.

Stack Trace:

at Microsoft.Practices.Unity.SynchronizedLifetimeManager.TryExit()

Entire timer elsapsed event handler:

private void TimerElapsed(object sender, ElapsedEventArgs e)
{
            // Lock and free free the queue quickly - write to an intermediate list.
            var list = new List<LogEntry>();
            lock (LogEntryQueueLock)
            {
                while (true)
                {
                    if (_logEntryQueue.Count <= 0)
                        break;

                    //dequeue the LogEntry that will be written to the log
                    list.Add(_logEntryQueue.Dequeue());
                }
            }

            // Flush the list in to the log
            for (int i = 0; i < list.Count; i++)
            {
                ProcessEntry(list[i]);  // Strip commas from the string
                Logger.Write(list[i]);  //  <<<== ERRORS HERE
            }

}

Many thanks for any suggestions!

[EDIT]: I tried to call Logger.Write direclty, without the timer elapsed event – same problem…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:17:50+00:00Added an answer on June 17, 2026 at 3:17 pm

    This looks to be an existing issue: http://unity.codeplex.com/workitem/7206.

    The good news is that this should be resolved with version 2.1.505.2 which you can get at: http://nuget.org/packages/Unity/2.1.505.2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have only started getting this error. The application works perfectly when working on
I just started getting this error today, seemingly out of nowhere. Any one see
Out of the blue today I started getting this error in Visual Studio 2008
I updated from Grails 2.0 to 2.0.1 and started getting this error. Any ideas
When I'm trying to seed my database, I started getting this error: rake aborted!
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'
Following this tutorial (http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/handling-concurrency-with-the-entity-framework-in-an-asp-net-mvc-application), I learned how to save data and do concurrency checks
I recently started getting this error while running gems or bundler. The only thing
OK have just started getting this error and I'm not sure why. I have
I started getting this error in ASP.NET Gridview SQLDataSource. Everything was fine. In the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.