简体   繁体   English

无法连接到Windows 10上的SQL Server和使用Visual Studio 2017

[英]Unable to connect to SQL Server on Windows 10 and using Visual Studio 2017

I am using Windows 10 and Visual Studio 2017. I am trying to connect to a database in SQL Server 2014. 我正在使用Windows 10和Visual Studio2017。我正在尝试连接到SQL Server 2014中的数据库。

Visual Studio does pick up the database as shown in the screenshot here: Visual Studio确实会选择数据库,如以下屏幕截图所示:

VisualStudio皮卡

The connection string is as follows: 连接字符串如下:

连接字符串

The code is: 代码是:

const string connString = "Data Source=CLEAVEN\\SQLEXPRESS;Initial Catalog=EduAssistR;Integrated Security=True";

But I still get error 26 in the browser: 但是我仍然在浏览器中收到错误26:

在此处输入图片说明

I've restarted the SQL Server Browser and enable TCP and Remote connections but I still get the error. 我已经重新启动了SQL Server浏览器并启用了TCP和远程连接,但是仍然出现错误。

If I use CLEAVEN\\SQLEXPRESS instead of CLEAVEN\\\\SQLEXPRESS , I get this error: 如果我使用CLEAVEN\\SQLEXPRESS而不是CLEAVEN\\\\SQLEXPRESSCLEAVEN\\\\SQLEXPRESS此错误:

一刀切

What could be wrong? 有什么事吗

Thank you in advance. 先感谢您。

I found what was wrong. 我发现出了什么问题。

Silly silly mistake. 愚蠢的愚蠢的错误。

In the Web.config 在Web.config中

I did not change my connection string. 我没有更改连接字符串。 Once I changed it there, all was solved. 一旦我在那里更改,一切都解决了。

Thank you to everyone 谢谢大家

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到Visual Studio中的SQL Server - Unable to connect to SQL Server in Visual Studio 无法在Visual Studio 2017中引用Windows IoT - Unable to reference Windows IoT in Visual Studio 2017 如何使用Visual Studio 2017中编译的C#应用​​程序连接到SQL Server 2008? - How to connect to SQL Server 2008 with C# application compiled in Visual Studio 2017? 为什么使用Visual Studio 2013 + Microsoft SQL Server 2017 Developer连接数据库有空白页 - Why use Visual Studio 2013 + Microsoft SQL Server 2017 Developer to connect Database have blank page 使用Visual Studio服务器资源管理器连接到远程SQL Server 2012 - Connect to remote SQL server 2012 using visual studio server explorer Windows 10使用Visual Studio Express 2015构建使用SQL Server CE的程序只是挂在其他平台上 - Windows 10 Using Visual Studio Express 2015 to build program using SQL Server CE just hangs on other platforms Visual Studio 2017 - 无法将“ReportViewer”添加到“Windows 窗体” - Visual Studio 2017 - Unable to add “ReportViewer” to “Windows Form” 如何使用 Visual Studio 通过 C# 连接到 SQL 服务器实例 - How to connect to a SQL Server instance with C# using Visual Studio 使用REST API将Xamarin表单连接到SQL Server 2017 Management Studio - Connect Xamarin Forms to SQL Server 2017 Management Studio using REST API 无法通过Windows身份验证使用连接字符串连接到SQL Server - Unable to connect to SQL Server using a connection string with Windows authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM