我在 nopcommerce 3.90 中运行项目时遇到错误,有时它运行良好,但有时会显示“无数据库实例”的错误。我很惊讶它显示了这种类型的错误。因为我为运行 nopcommerce 项目所做的正常事情。
我做了这些事情:
通过安装 nopcommerce 设置设置文件。
删除 nopcommerce 的 bin 文件夹。
清理解决方案并重建它。
但仍然面临同样的问题。
我在 nopcommerce 3.90 中运行项目时遇到错误,有时它运行良好,但有时会显示“无数据库实例”的错误。我很惊讶它显示了这种类型的错误。因为我为运行 nopcommerce 项目所做的正常事情。
我做了这些事情:
通过安装 nopcommerce 设置设置文件。
删除 nopcommerce 的 bin 文件夹。
清理解决方案并重建它。
但仍然面临同样的问题。
“没有数据库实例”这种类型的错误发生在 Nopcommerce 无法与数据库连接时。如果您已在本地创建数据库,请尝试查找 SQL 服务并重新启动该服务。但是,如果您将数据库托管在任何其他服务器上,请检查您的网络连接。
There are some of summery solution that i have mention as below
=> Since i had moved a live cart to a test server, the settings in the database for that cart had force ssl and also force www before any url. Also under Store settings i still had the domain info for that site which was now difrent in the test server. Once i noticed this and updated the database it all started working.
=>
You try change settings.txt file:
DataConnectionString: Data Source=localhost/IP;Initial Catalog=DBName;Integrated Security=False;Persist Security Info=False;User ID=DBUser;Password=DBPass;MultipleActiveResultSets=True
=>
In my case I need config application pool for nopcomerce
my connection string
DataProvider: sqlserver
DataConnectionString: Data Source=.;Initial Catalog=nopcommerce370;Integrated Security=True;Persist Security Info=False
I need set Application Pool Identity to user has access right to db
Check the image to details.
=> Check also db permission.
=> try with
Data Source=9X.2XX.7X.XX\"yoursqlservenameinstance"
or
Data Source="yournamemachine"
or
Data Source="yournamemachine"\"yoursqlservenameinstance"
你可以做一些事情,比如
检查 App_data 上的设置文件是否存在
检查连接字符串是否正确
检查您的 SQL 服务器是否正常工作或通过尝试连接停止
清除浏览器缓存
试试这个``
Right click on the downloaded file (nopCommerce_3.40_Source.rar) ->select properties -> press "Unblock".
和
and change connection string in Settings.txt file.