0

I am using the following tools;

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

I have successfully configured DotNetNuke on IIS but when practically installing it creates problem during database connection. In visual studio i use connection string as.

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

And in the web.config file of my DNN setup i have written my connection string as;

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

with this setting i am getting erros as.

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

Have i written my connection string wrong? Any help in this regard will be appreciated

2 Answers2

0

If you have a local instance of SQL Server, the following example should work.

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

This only works if you have create an empty database in SQL Server called "dnn721" and your current user account has owner privileges to the database.

Fix It Scotty
  • 2,852
  • 11
  • 12
0

If it's useful to anyone, I am using parallels and spinning up a new DNN 7 in my local. I had the same issue and I corrected it just by placing in my actual server name in my case it looked something like: DESKTOP-JVXXXR2C

It is also useful (for debugging connections, and I hate to use the word debugging) to create a .udl file on your desktop (or wherever) and test the connection until you get it. It's pretty straightforward how to do it, and I won't even bother telling you more than that in case I may confuse you. Just trust me, it is very easy. Just create a file called anything you want and make sure it is of type .udl (for example test.udl). Then you just double click it and it will let you test your connection.