Write logging file

Discussion in 'General troubleshooting' started by Didacus, Oct 6, 2011.

  1. Hello, in my application I have to write some information in a log file and then I set in web.config the following folder "Log\ContabilitaSelfService.log" But my application does not log anything. I also tried with "E:\web\ contabil\ Log\ ContabilitaSelfService.log" but with the same result . Is there any permission issue? Why not give me no error in particular, just does nothing.

    Thanks in advance.

    Regards,

    Diego
     
  2. An application needs a full trust permission to be able to write on a directory above/below it. By default, all application run on our environment is set to medium trust.
    http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx

    yet if no error thrown, it could simply means your code is not working. Have you test it locally and see if it works? Also what kind of information you want the application to write on a log file?
     
    Last edited by a moderator: Oct 14, 2015
  3. Thanks Allegro13, yes I tried locally and it works fine.
    I add the <trust level="Full" /> element in my web.config but it doesnt't work.
    I simply write in a text file, example pippo.txt, some information and for this scope I use Enterprise Logging Application Block for Silverlight that use WCF RIA Services.

    Thanks,
    Regards

    Diego
     

Share This Page