logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Jansen" <Georg.Jan...@FaktNet.com>
Subject RE: How to pass integrated security credentials to AdoNetAppender from ASP.NET?
Date Fri, 30 Sep 2005 00:44:00 GMT
Billy, 

In your code you have

AdoNetAppender adoAppender =
     (AdoNetAppender)hierarchy.Root.GetAppender("SqlServerAppender");

I changed this to:

AdoNetAppender adoAppender =
     (AdoNetAppender)hierarchy.Root.GetAppender("AdoNetAppender");

Did you name your appender SqlServerAppender in the config file?.

I also hardcode the connection string in the program (just to reduce the
number of places things could go wrong):

adoAppender.ConnectionString = "Data Source=(local); initial
Catalog=Log4Net;Integrated Security=SSPI;Trusted_Connection=yes;"
 
And I am successfully logging using this security context; I also verified
in SQL profiler that log4net is actually logging on using this security
context.

Regards
Georg
www.l4ndash.com - Log4Net Dashboard


-----Original Message-----
From: Billy Barnum [mailto:b.barnum@comcast.net] 
Sent: 30. september 2005 02:11
To: 'Log4NET User'
Subject: RE: How to pass integrated security credentials to AdoNetAppender
from ASP.NET?

Well, nice ta know I'm not completely crazy. BTW, I only put those lines of
code in after I couldn't get the integrated security to work properly by
just putting in a connection string in the .config file. I really want to
pass through as you are doing.

As I said, I'll double-check my work. And the way this last week has been
going, it'll all prolly work just fine and I'll be red-faced.

-B





Mime
View raw message