2015-01-16 55 views
0

我在安裝dotnetscorm LMS後收到此錯誤。 安裝完成後沒有問題。我使用具有連接權限和足夠權限訪問數據的用戶名和密碼將連接字符串設置爲(本地)服務器。然後嘗試打開默認的頁面時,我收到此錯誤:dotnetscorm-error:26 - 錯誤定位服務器/實例指定

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) 

嗯,我肯定沒有與連接和遠程aconnection沒有問題,是允許的。有趣的是,當我更改用戶名或密碼或更改數據庫對象的權限時,它會抱怨權限較低,因此顯然可以訪問服務器。 我該怎麼辦?順便說一下,我知道dotnetscorm是舊的,有python的開源平臺,但我是一個dotnet的傢伙!

+0

不,這是一個SQL連接問題 – leppie

+0

好了,你能告訴我該怎麼解決呢? –

+0

請讓我們知道web.config中的連接字符串格式。簡單的測試就是先創建DSN和測試連接字符串。 – Amit

回答

0

好的,我設法找到了問題: 在我的機器配置(我不在乎在哪裏)有一個LocalSqlServer連接,我只需要在我自己的connectionstrings部分中刪除它。

<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"/> 

相關問題