The ASP.Net server executes the same code for different users in different
threads. So each thread has it own username property. Change the username
property in one thread will not affect the name property of another
thread
I have test this in the VS2005 environment, and it works..
Zhen
Dear all:
I am trying to write a log wrap class in asp.net project.
I want to use a static logger ,such as public static ILog log =
LogManager.GetLogger("");
Then I want to use log4net.ThreadContext.Properties[Key] to set
custom fields. Such as "usern
Ok, got it working.
More exactly, it was already working...but it wouldn't show anything in the
database because the bufferSize attribute was the default one...so it would
only log after 512 log entries...
I added to the configuration and it showed
immediately.
I hope this helps someone that is
Hmm, I'm using Npgsql as provider for data access.
NpgsqlConnection inherits DbConnection and so forth.
I've tried to put this working with the following configuration: