.NET Core NLog连接字符串

时间:2018-06-12 14:48:18

标签: .net logging nlog

这是我的nlog.config:

  <targets>
     <target name="dbLog" type="Database" dbProvider="mssql">
      <connectionString>
        Data Source=rppp.fer.hr;Initial Catalog=RPPP07;User Id=userName;Password=myUserName
      </connectionString>

  ........

    </target>

</nlog>

我收到错误:

  

2018-06-12 16:22:35.0071错误写入数据库时​​出错。例外:System.Data.SqlClient.SqlException(0x80131904):用户''登录失败。      在System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,Boolean allowCreate,Boolean onlyOneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal&amp; connection)      在System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,TaskCompletionSource`1 retry,DbConnectionOptions userOptions,DbConnectionInternal&amp; connection)...

我的连接字符串有什么问题?我正在连接到远程SQL Server数据库。

0 个答案:

没有答案