Enterprise library logging not working for my sub website. RRS feed

  • Question

  • Hi,

    I have a site A at wwwroot with X type of authentication and a sub website B(wwwroot/B) under A(wwwroot) with Y type of authentication. Both sites have their individual web.config files which are almost same except some appSettings. 

    If the authentication X is failed, then the user will be redirected to Y authentication which is wwwroot/B.

    I have c:\A\log.file for wwwroot and c:\B\log.file for wwwroot/B sub website.

    Issue: The Enterprise logging is working fine at wwwroot but not in wwwroot/B.

    Please help.







    Monday, November 1, 2010 8:41 PM

All replies

  • Hello there,

    are you sure that you have added the reference of the enterprise assembly for logging. Be on the safer side the recheck the working samples given by Microsoft.



    Phijo Mathew Philip.

    Tuesday, November 2, 2010 4:37 PM
  • Hello there,

    A sample link is given below.

    Using Logging application Block in Enterprise library 4.0

    Hope this helps.


    Phijo Mathew Philip.

    Tuesday, November 2, 2010 4:48 PM
  • How would it work for some users and not others if he'd missed the reference out?
    Wednesday, November 3, 2010 7:59 AM
  • It seems obvious that the users ( or the user the process runs under ) don't have authority to write to c:\B\log.file.

    Most likely culprit is the web.config. Is the actual user writing the data the one you were assuming.  I would think next likely is cross domain.


    Wednesday, November 3, 2010 8:08 AM
  • Hi Everyone,

    Sorry for the delay in response.

    Thank you for all your responses. The problem was resolved by removing the logging entries from the sub website. However, there is a known issue with enterprise library 2.0 where if the file is exclusively locked ( remember i have 2 websites pointing to the same log file), then another file with a pre appended GUID will be created. For eg: log.file &  f0c619ff-d876-4c75-bead-6ec2e189af2alog.file

    I am working on upgrading it to the latest enterprise libraries if it would resolve the exclusive lock issue.









    Friday, November 12, 2010 7:00 PM