Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 89412 invoked from network); 22 Oct 2008 15:17:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 15:17:45 -0000 Received: (qmail 58844 invoked by uid 500); 22 Oct 2008 15:17:46 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 58820 invoked by uid 500); 22 Oct 2008 15:17:46 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 58809 invoked by uid 99); 22 Oct 2008 15:17:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 08:17:46 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [75.126.159.251] (HELO tx251-cr1.mx.dnspark.net) (75.126.159.251) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 15:16:34 +0000 Received: by tx251-cr1.mx.dnspark.net (Postfix, from userid 45) id 2CAD3F3A34; Wed, 22 Oct 2008 10:17:11 -0500 (CDT) Received: from roychastain.org (adsl-065-012-171-143.sip.asm.bellsouth.net [65.12.171.143]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by tx251-cr1.mx.dnspark.net (Postfix) with ESMTPSA id CB13DF39FE for ; Wed, 22 Oct 2008 10:17:10 -0500 (CDT) Content-class: urn:content-classes:message Subject: RE: How to pass password to AdoNetAppender? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 22 Oct 2008 11:17:08 -0400 Message-ID: In-Reply-To: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to pass password to AdoNetAppender? thread-index: Ack0WJlMsSiAYrezR065usJ2VtbYLAAACeYg References: <002b01c93445$a1761cf0$e46256d0$@Jansen@Faktnet.com> <8464C36201C7C541A42F676EBFE94E9201333E9AEE67@APEXMAIL.corp.dom> From: "Roy Chastain" To: "Log4NET User" X-Sanitizer: DNS Park mail filtering. For more information see X-Sanitizer: http://www.dnspark.com/services/mailProtection.php X-Virus-Checked: Checked by ClamAV on apache.org Store the encrypted information in a config file. Use a setup program to solicit and encrypt the information. Use the DPAPI wrapper code (System.Security.Cryptography.ProtedData) in .Net 2.0 and up to encrypt, decrypt and protect the keys. Very simple to use. ------------------------------------------------------------------------ ---------- Roy Chastain -----Original Message----- From: Bernhard Heinzel [mailto:bernhard.heinzel@live.com]=20 Sent: Wednesday, October 22, 2008 11:11 To: Log4NET User Subject: RE: How to pass password to AdoNetAppender? Thanks Michael. But my Problem is that I have to configure the AdoNetAppender with a config file so I don't have to recompile if I change the database. ________________________________ From: Michael.Richman@pgn.com To: log4net-user@logging.apache.org Date: Wed, 22 Oct 2008 07:55:41 -0700 Subject: RE: How to pass password to AdoNetAppender? You can set the connection string in code, here is some sample code, you only have to do this once and then you can use the AdoNetAppender multiple times. =20 log4net.Config.XmlConfigurator.Configure(); log4net.Repository.Hierarchy.Hierarchy h =3D (log4net.Repository.Hierarchy.Hierarchy) log4net.LogManager.GetRepository(); log4net.Appender.AdoNetAppender adoAppender =3D (log4net.Appender.AdoNetAppender) h.Root.GetAppender("AdoNetAppender_UserLog"); adoAppender.ConnectionString =3D ; ________________________________ From: Bernhard Heinzel [mailto:bernhard.heinzel@live.com] Sent: Wednesday, October 22, 2008 7:17 AM To: Log4NET User Subject: RE: How to pass password to AdoNetAppender? Thanks Georg. Unfortunatly integrated Security is not an option. Seems it is not as trivial as it seems... Any other suggestions? Bernhard ________________________________ From: Georg.Jansen@Faktnet.com To: log4net-user@logging.apache.org Subject: RE: How to pass password to AdoNetAppender? Date: Wed, 22 Oct 2008 14:56:36 +0200 Bernhard, =20 This maybe of the point in your case, but have you considered using integrated security? =20 You could store the username and password encrypted, but then you have the added problem of securing the encryption key. =20 Maybe one of the links below is useful: =20 http://msdn.microsoft.com/en-us/library/89211k9b.aspx http://www.theserverside.net/tt/articles/showarticle.tss?id=3DNewSecurityF eatures =20 =20 Best regards Georg Log4Net Dashboard - Log Analysis and Monitoring made easy! http://www.l4ndash.com =20 =20 =20 From: Bernhard Heinzel [mailto:bernhard.heinzel@live.com]=20 Sent: 22. oktober 2008 14:08 To: lLog4NET Users Subject: How to pass password to AdoNetAppender? =20 Hi, another Question from the new guy. I want to pass the username and password for the database to the AdoNetAppender. The two ways I found were: * Plaintext in the config file. * 'Plaintext' in the sourcecode. Both ways are not optimal, so were I missing something? Is there a smarter way of passing a password? Thanks in advance. Regards Bernhard =20 ________________________________ Connect to the next generation of MSN Messenger Get it now! =20 ________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it! =20 ________________________________ Discover the new Windows Vista Learn more!