tags:

views:

282

answers:

0

hey, i use nlog in my project.my web.config like this:

<connectionStrings>
  <add name="SQL_ConnStr" connectionString="Initial Catalog=ConfigDB;Provider=SQLOLEDB; Data Source=mysqlserver; User ID=sa; Password=sa; Persist Security Info=True;"/>
</connectionStrings>
...
<nlog>
<targets>
  <target name="database" type="Database" dbProvider="sqlserver" **connectstring="Initial Catalog=ConfigDB;Provider=SQLOLEDB; Data Source=mysqlserver; User ID=sa; Password=sa"** commandText="INSERT INTO ...">
</target>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="database"/>
</rules>
</nlog>

Two identical connectstring!my question is how to keep only one connectstring. thanks!