soft.narayan Ответов: 0

Как использовать шифрование пароля и где и как мы будем расшифровывать пароль в log4.net


Hi I am using below log4.net for log in DB but issue here is i want to use encrypted password instead of plain text , if i will use encrypt password how and where decrypt so that it will logs in DB. I have decrypt logic code part.

In General in .net we are keeping encrypt password in web.config file and before passing in connection string in Data access layer we are decrypting and sending .How we will do for log4net in c# website.

<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">

<bufferSize value="1"/>
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<connectionString value="Data source=DB IP;Initial catalog=DB NAME;User ID=USER ID;Password=XXX@XXX1234"/>


Что я уже пробовал:

Это моя строка подключения в файле web.config

<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">

<bufferSize value="1"/>
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<connectionString value="Data source=DB IP;Initial catalog=DB NAME;User ID=USER ID;Password=XXX@XXX1234"/>

0 Ответов