安装DotNetNuke:数据库连接失败 [英] Installing DotNetNuke : Database Connection Failing

查看:112
本文介绍了安装DotNetNuke:数据库连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在本地计算机上设置DNN,但是出现以下错误。

I am trying to setup DNN on my local machine but having following error.



安装DotNetNuke

Installing DotNetNuke

升级错误:错误:无法连接到SqlDataProvider的connectionString中指定的数据库

Upgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider


我安装了 SQL Server 2014 Express ,并创建了自定义登录名。
我可以使用SQL Management Studio登录并使用相同的凭据访问数据库。

I have a SQL Server 2014 Express installed with custom login created. I can login and access to database with same credentials using SQL Management Studio.

在web.config文件中,以下几行用于数据库连接:

In web.config file, I have following lines for Database connection:

<connectionStrings>
<add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=<dbName>;User ID=<UID>;Password=<PWD>" providerName="System.Data.SqlClient" />
<add name="SiteSqlServerAcuity" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=<dbName>;User ID=<UID>;Password=<PWD>" providerName="System.Data.SqlClient" />
<add name="AcuityEntities" connectionString="metadata=res://*/DAO.Model.SalesAcuity.csdl|res://*/DAO.Model.SalesAcuity.ssdl|res://*/DAO.Model.SalesAcuity.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;Initial Catalog=<dbName>;Persist Security Info=True;User ID=<UID>;Password=<PWD>;MultipleActiveResultSets=True;Application Name=EntityFramework&quot;" providerName="System.Data.EntityClient" />

<appSettings>
<add key="SiteSqlServer" value="Data Source=.\SQLEXPRESS;Initial Catalog=<dbName>;User ID=<UID>;Password=<PWD>"></add>
</appSettings>

我已根据互联网上的大量引用验证并更改了两个部分中的连接字符串,但没有一个起作用。

I verified and changed connectionstrings in both sections as per so many references on internet but none of them worked.

是否需要其他配置?还是需要对web.config或数据库配置进行任何更改?

Is there any other configuration needed? Or any change needed in web.config or Database configuration ?

这不是DOTULT DOTNETNUKE软件包。我正尝试设置的一个自定义项目。

推荐答案

这更多是对@Mitchel Sellers的评论,第1点。但是对于注释字段来说有点太多了。

This is more of a comment to @Mitchel Sellers answer, point 1. But it's a bit too much for a comment field.


  1. 运行SQL Server配置管理器。

  2. 转到 SQL Server网络配置。

  3. 单击 < INSTANCE> 的协议。
  4. 在右窗格中,双击 TCP / IP。

  5. 确保将已启用设置为是。

  6. 转到选项卡 IP地址。

  7. 对于每个IP,将 TCP端口设置为 1433,将 TCP动态端口设置为
    将 0,活动和启用设置为是。

  8. 使用 IPALL将端口设置为 1433,将动态保持不变。 / li>
  9. 重新启动或重新启动SQL Server服务。

  1. Run the SQL Server Configuration Manager.
  2. Go to "SQL Server Network Configuration".
  3. Click "Protocols for <INSTANCE>".
  4. In the right pane double click on "TCP/IP".
  5. Make sure that "Enabled" is set to "Yes".
  6. Go to the tab "IP Adresses".
  7. For each IP, set the "TCP Port" to "1433", the "TCP Dynamic Port" to "0" and "Active" and "Enabled" to "Yes".
  8. With "IPALL" just set the port to "1433", leave the Dynamic as is.
  9. Reboot or restart the SQL Server service.

通过这些步骤,我可以连接到IIS使用 localhost

With these steps I get a connection to the database from IIS using localhost

如果找不到配置向导ger在开始菜单中,您可以使用 C:\Windows\SysWOW64\mmc.exe / 32 c:\Windows\SysWOW64\SQLServerManager12.msc

If you cannot find the Configuration Manager in the Start Menu, you can run it manually with C:\Windows\SysWOW64\mmc.exe /32 c:\Windows\SysWOW64\SQLServerManager12.msc

这篇关于安装DotNetNuke:数据库连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆