我正在尝试使用Connectionstring中的Trusted_Connection=true从UWP应用程序连接到SQL Server。Connection.Open失败并显示错误18452 (与可信的sql server连接不关联)。我可以使用Windows-Authentication与SSMS连接。即使来自.Net核心应用程序,使用相同连接字符串的连接也会成功。
在UWP-Capabilities中,我检查过:Enterprise Authentication, Internet (Client&Server), Private Networks目标版本是Win10版本1903,最低版本是Win 10 Fall Creators更新
下面是一个代码片段:
using (SqlConnection c = new SqlConnection("Server=sql02;Database=Workdata_test_ad;Trusted_Connection=True"))
await c.OpenAsync();编辑:使用显式用户名和密码连接很好,但不是目标。
发布于 2020-03-04 18:13:09
尝试服务器名称为‘. SqlConnection("Server=.;Database=pzdb01_test_ad;Trusted_Connection=True"))
发布于 2020-03-05 22:04:42
我们的开发sql服务器运行在Ubuntu上,我无法连接到Ubuntu。生产服务器运行在Windows上,我可以通过UWP-App连接到Windows。
https://stackoverflow.com/questions/60523576
复制相似问题