dotnetscorm-error:26 - 找到指定的服务器/实例时出错

时间:2015-01-16 09:39:59

标签: asp.net

我在安装dotnetscorm LMS后收到此错误。 安装完成没有问题。我使用具有连接权限和足够权限访问数据的用户名和密码将连接字符串设置为(本地)服务器。然后在尝试打开默认页面时,我收到此错误:

Server Error in '/' Application.

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

嗯,我确信连接没有问题,允许远程连接。有趣的是,当我更改用户名或密码或更改数据库对象的权限时,它会抱怨权限很低,因此很明显服务器是可访问的。 我该怎么办?顺便说一下,我知道dotnetscorm已经老了,python中有开源平台,但我是一个dotnet的人!

1 个答案:

答案 0 :(得分:0)

好的,我设法找到了问题: 在我的机器配置的某个地方(我不在乎哪里)有一个LocalSqlServer连接,我只需要在我自己的连接线部分中删除它。

<connectionStrings>
<remove name="LocalSqlServer"/>
<!-- SQL Server Native Client Connection String -->
<add name="DotNetSCORMDB" connectionString="Data Source=(local);Initial Catalog=DotNetSCORM;Persist Security Info=True;User ID=dns-user;Password=dnspassword" providerName="System.Data.SqlClient"/>
<add name="LocalSqlServer" connectionString="Data Source=(local);Initial Catalog=DotNetSCORM;Persist Security Info=True;User ID=dns-user;Password=dnspassword" providerName="System.Data.SqlClient"/>