如何为生产模式创建连接字符串 c# wpf

How can create connection string for production mode c# wpf

如何使用 C# 和 WPF 应用程序为生产模式创建连接字符串。现在我在开发者模式下使用了这个连接字符串和 Windows 身份验证。并且运行良好。

<connectionStrings>
<add name="SensorSystem" connectionString="Data Source=DEVELOPMENT\SQLEXPRESS;Initial Catalog=SensorSystem;Integrated Security=True"
  providerName="System.Data.SqlClient" />

为了测试我的应用程序在计算机上运行良好。但是什么时候完成并在服务器中添加数据库和在另一台计算机上安装应用程序需要 SQL 身份验证以获得更好的安全性和不同的连接字符串(我认为)。

结帐 https://www.connectionstrings.com/sql-server/ 满足您所有的连接字符串需求。

您需要删除 integrated security = True 并添加

用户 id=mylogon;密码=mypassword;