[英]dotnetscorm-error: 26 - Error Locating Server/Instance Specified
I am receiving this error after installing dotnetscorm LMS. 安装dotnetscorm LMS后,我收到此错误。 The installation finishes with no problem. 安装完成没有问题。 I set the connection string to the (local) server with a username and password that have connect permission and enough privileges for accessing the data. 我将连接字符串设置为具有用户名和密码的(本地)服务器,该用户名和密码具有连接权限和足够的特权以访问数据。 then when trying to open default page I receive this error: 然后在尝试打开默认页面时收到此错误:
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)
Well, I am sure there is no problem with the connection and remote aconnection is allowed. 好吧,我确定连接没有问题,并且允许远程连接。 Funny thing is when I change the username or password or change a permission on the database objects it complains about low permissions so obviously server is accessible. 有趣的是,当我更改用户名或密码或更改数据库对象的权限时,它抱怨权限较低,因此显然服务器可以访问。 What should I do? 我该怎么办? By the way I know that dotnetscorm is old and there are open source platforms in python but I am a dotnet guy! 顺便说一句,我知道dotnetscorm很旧,并且在python中有开源平台,但我是一个dotnet家伙!
Ok, I managed to find the problem: Somewhere in my machine configuration (and I don't care where) there is a LocalSqlServer connection and I just needed to remove it in my own connectionstrings section. 好的,我设法找到了问题:在我的计算机配置中的某个地方(我不在乎)有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"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.