none
Logs in Windows Vista RRS feed

  • Question

  • Hi,

    I have used the logging component of Microsoft Enterprise Library in my application. On Vista machines the logs aren't being created at all. The application is only able to write the logs if the administrator sets the write permissions for the application in the folder where it is installed, which is a major head-ache.

    Is there some way in which the application can be made to write the logs without having to explicitly set permissions for every install of the application ?

    Any help in this matter would be highly appreciated !

    Thanks in advance !!!

    TheStarSailor
    Friday, August 29, 2008 7:07 AM

Answers

  • Avoid silently swallowing exceptions.  Use Debug + Exceptions to get the debugger to stop on the first chance opportunity.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Wednesday, September 3, 2008 9:04 AM
    Friday, August 29, 2008 12:06 PM
    Moderator

All replies

  • To add to the previous post, I cannot debug on the Vista machines. There is no dev. environment set up on them. This ideally represents a deployment environment on customers' machines.


    TheStarSailor
    Friday, August 29, 2008 7:09 AM
  • Can't you configure the logging so it doesn't try to write to the application directory, but rather somewhere where you have write permissions per default (such as the %TEMP% directory or in Application Settings)?

    Mattias, C# MVP
    • Marked as answer by TheStarSailor Friday, August 29, 2008 7:24 AM
    • Unmarked as answer by TheStarSailor Friday, August 29, 2008 7:24 AM
    Friday, August 29, 2008 7:23 AM
    Moderator
  • Hi Mattias,

    The application that I am building has a designated folder structure and the logs directory falls into that folder structure. Moving the logs out of that directory would mean a change in the deployment setup as well as changes in the core application as well. Unfortunately, at this time, I don't think I can move that directory out.

    Any further ideas ?

    Thanks !!!

    TheStarSailor
    Friday, August 29, 2008 7:28 AM
  • You will have to make your application compatible with Vista.  Doing it the other way around never worked yet.
    Hans Passant.
    Friday, August 29, 2008 9:42 AM
    Moderator
  • Hi Mattias/Hans,

    I just saw that even if I use the user\Application Data\Local folder in Vista, the logs are not being written in them if I have logged into the Standard User profile. It works for the Administrator profile though.

    Any pointers ?
    TheStarSailor
    Friday, August 29, 2008 11:57 AM
  • Avoid silently swallowing exceptions.  Use Debug + Exceptions to get the debugger to stop on the first chance opportunity.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Wednesday, September 3, 2008 9:04 AM
    Friday, August 29, 2008 12:06 PM
    Moderator