Solved

.Net logwriter failed to write to log file causing subsequent batch processing to fail

Posted on 2013-01-30
6
615 Views
Last Modified: 2013-02-09
One of the vendor written application (using .Net) was not able to
proceed to do batch processing when it fails to write to a logfile
(as writing to logfile is done first before it can proceed to do the
 batch processing):

I'm currently checking for the log filename & the ownership of
the log from the programmer.

Below is the error / messages:

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

Application: XXX.eConnect.BatchJob.Executor.exe

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Practices.ServiceLocation.ActivationException
Stack:
   at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.get_Writer()
   at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write (Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry)
   at XXX.eConnect.BatchJob.BatchJobUtility.TraceInfo(System.String, System.String, System.String)
   at XXX.eConnect.BatchJob.Executor.Program.Main(System.String[])
0
Comment
Question by:sunhux
  • 3
6 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 38839823
Wrap the Logging method using try.. catch and handle the exception accordingly.
0
 

Author Comment

by:sunhux
ID: 38840054
can you give me a sample code of how you would do "wrap the Logging"
& handle the exception?
0
 

Author Comment

by:sunhux
ID: 38840088
Attached the portion of codes which our programmer suspect:
just trying my luck to see if the attached screen will give any clue
dotNetLogwriter.jpg
0
 

Author Closing Comment

by:sunhux
ID: 38871296
Not quite address the issue
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to count occurrences of each item in an array.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now