小编ata*_*sov的帖子

Linux Entity Framework Core 上的 SQL Server 连接字符串无效

我正在使用 Linux,更具体地说是 Xubuntu。我已经在我的机器上安装了 SQL Server Express。我目前正在制作一个网络应用程序,但我的连接似乎无法正常工作,或者我对所有内容都不太了解?

我得到的输出是:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 25 - Connection string is not valid)
Run Code Online (Sandbox Code Playgroud)

我已经尝试了所有我可能找到的方法,但没有任何效果。这可能是因为缺乏 Linux 用户的信息,但我仍然无法弄清楚。

通常,我正在尝试使用 EF 核心在我的控制台应用程序中使用连接字符串连接到我的本地 SQL 服务器。像这样:

internal const string CONNECTION_STRING =
            "Server = .\\SQLEXPRESS; Database = Questionnaires; Integrated Security = True"; …
Run Code Online (Sandbox Code Playgroud)

c# linux entity-framework entity-framework-core asp.net-core

2
推荐指数
1
解决办法
3216
查看次数