I had Log4Net working on my Local machine. It logged to a DB with one FileAppender, Nothing logged to a file. When I moved my code to my shared Hoting provider (GoDaddy) I got an exception about FileIOPermission required.
Does anyone have any ideas of what might have been happening?
I removed the configuration and am at the moment using ELMAH to log everything, (although I would like to use Log4Net) so I don’t have any of the examples or stack traces anymore.
Any thoughts would be appreciated.
This is not much info to work with, but here are a few things you can do:
permissions. If it’s a web project,
look at what user the application
pool is running under (usually LOCAL
SYSTEM), and that user needs write
access to the file (and the
directory where you want to put the
file). The fact that the exception
is actually FileIOPermission
required definitely points to this
direction.
trying to use when you’re logging to
a db. In that case, you might going
to have to change your temp folder.
Furthermore, look at this post:
Log4Net works on Dev machine, fails when deployed to shared host (using same db/connstring)