DotNetNuke Sql Server 2008 R2 的配置问题



我正在使用以下工具;

Visual Studio 2010 Professional Edition.
Sql Server 2008 R2
DotNet DNN_Platform_07.02.01
Microsoft Windows 7 Ultimate.

我已经在IIS上成功配置了DotNetNuke,但是在实际安装时,它在数据库连接期间会产生问题。在视觉工作室中,我使用连接字符串作为。

<connectionStrings>
<clear />
<add name="myConnectionString" providerName="System.Data.SqlClient"
connectionString="Data Source=localhost; Integrated Security=SSPI; Initial Catalog=MyDB"
</connectionString>

在我的 DNN 设置的 web.config 文件中,我将连接字符串写为;

  <connectionStrings>
<!-- Connection String for SQL Server 2008/2012 Express -->
<add name="SiteSqlServer" connectionString="Server=(localhost);Database=dnn6003; Integrated Security=True;User Instance=True;" providerName="System.Data.SqlClient" /> 

<add key="SiteSqlServer" value="Server=(localhost);Database=dnn6003;Integrated Security=True;User Instance=True;"/>
<add key="InstallTemplate" value="DotNetNuke.install.config" />
<add key="AutoUpgrade" value="true" />
<add key="UseInstallWizard" value="true" />
<add key="InstallMemberRole" value="true" />
<add key="ShowMissingKeys" value="false" />
<add key="EnableCachePersistence" value="false" />
<add key="HostHeader" value="" />
<!-- Host Header to remove from URL so "www.mydomain.com/johndoe/Default.aspx" is treated as "www.mydomain.com/Default.aspx" -->
<add key="RemoveAngleBrackets" value="false" />
<!--optionally strip angle brackets on public login and registration screens-->
<add key="PersistentCookieTimeout" value="0" />
<!--use as persistent cookie expiration. Value is in minutes, and only active if a non-zero figure-->
<!-- set UsePortNumber to true to preserve the port number if you're using a port number other than 80 (the standard)
    <add key="UsePortNumber" value="true" /> -->
<!-- Services Framework Tracing is primarily useful for developing and debugging -->
<add key="EnableServicesFrameworkTracing" value="false" />
<add key="InstallationDate" value="2/9/2014" />

使用此设置,我得到了错误。

ERROR:Index #: 0
Source: .Net SqlClient Data Provider
Class: 20
Number: 53
Message: 

我的连接字符串写错了吗?在这方面的任何帮助将不胜感激

如果您有 SQL Server 的本地实例,则以下示例应该有效。

<add name="SiteSqlServer" connectionString="Server=.;Initial Catalog=dnn721; Integrated Security=True;User Instance=True;" providerName="System.Data.SqlClient" />

仅当您在 SQL Server 中创建了一个名为"dnn721"的空数据库并且您当前的用户帐户对该数据库具有所有者权限时,这才有效。

如果它对任何人都有用,我正在使用 parallels 并在我本地启动一个新的 DNN 7。我遇到了同样的问题,我只是通过在我的情况下输入我的实际服务器名称来纠正它,它看起来像:桌面JVXXXR2C

在桌面(或任何地方)上创建一个 .udl 文件并测试连接直到获得它也很有用(用于调试连接,我讨厌使用调试这个词)。怎么做很简单,我什至懒得告诉你更多,以防我可能会让你感到困惑。相信我,这很容易。只需创建一个名为您想要的任何内容的文件,并确保它是 .udl 类型(例如 test.udl)。然后,您只需双击它,它就会让您测试连接。