8. Now let’s make the changes to the .config file. Navigate to the ‘website’ folder. If you’re installing to your own web server or XP, or if you have RDC (Remote Desktop Access) to your server, then rename release.config to web.config. If you are installing to a web host that requires Medium Trust, then rename the development.config file to web.config. Open the web.config file in an editor.
9. Make the following changes to the web.config file:
a. Delete the references to the SQLExpress database:
b. Move the commented out SQLDataProvider ‘-->’ to follow the start of the comment ‘<!—‘ on the line that says ‘<!-- Connection String for SQL Server 2000/2005’. At the end, the configuration settings should look like this:
<connectionStrings>
<!-- Connection String for SQL Server 2000/2005 -->
<add
name="SiteSqlServer"
connectionString="Server=[SERVERNAME];Database=[DATABASENAME];uid=[LOGIN];pwd=[PASSWORD];"
providerName="System.Data.SqlClient" />
</connectionStrings>
Where all of the above words in CAPS and surrounded by square brackets are replaced with whatever you called your database, and whatever username you gave. In our example above, the settings will look like this:
<connectionStrings>
<!-- Connection String for SQL Server 2000/2005 -->
<add
name="SiteSqlServer"
connectionString="Server=system-computername;Database=dnn_fingerfuel;uid=dnn_ff_dbo;pwd=mypassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>
NOTE: if installing to a localhost installation, the connection string may look like:
connectionString="Server=(local);Database=dnn_fingerfuel;uid=dnn_ff_dbo;pwd=mypassword;"
c. Next, you also have to change the connection string in the ‘AppSettings’ section. You should also delete the reference to the SQLExpress connection string completely. Don’t forget to also move the end comment as per above!!! This really gets more than a few people, when they first install DotNetNuke. None of the install tutorials I’ve ever seen mention this—why, I don’t know; perhaps I am the only fool that doesn’t!
When you are done, using our example of our server named, ‘system-computername’, database named: ‘dnn_fingerfuel’, login of ‘dnn_ff_dbo’, and password = ‘mypassword’, the AppSettings section should look like this:
<appSettings>
<!-- Connection String for SQL Server 2000/2005 - kept for backwards compatibility - legacy modules -->
<add key="SiteSqlServer" value="Server=system-computername;Database=dnn_fingerfuel;uid=dnn_ff_dbo;pwd=mypassword;"/>
<add key="InstallTemplate" value="DotNetNuke.install.config" />
<add key="AutoUpgrade" value="true" />
<add key="InstallMemberRole" value="true" />
<add key="ShowMissingKeys" value="false" />
<add key="EnableWebFarmSupport" 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-->
</appSettings>
d. Next, if you are going to install multiple DotNetNuke installations on the same server, you should change any of the sections that create cookies…you want to make sure that one installation of DotNetNuke does not confuse storing values in one cookie that is used by more than one installation of DotNetNuke. Here are the two places you need to change cookie names:
<!-- Forms or Windows authentication -->
<authentication mode="Forms">
<forms name=".FFDOTNETNUKE" protection="All" timeout="60" cookieless="UseCookies"/>
</authentication>
And
<anonymousIdentification
enabled="true"
cookieName=".FFASPXANONYMOUS"
cookieTimeout="100000"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="None" domain=""/>
Notice that I changed the default of .DOTNETNUKE to .FFDOTNETNUKE, and for the anonymous connections cookie, I changed .ASPXANONYMOUS to .FFASPXANONYMOUS…
e. Finally, I strongly recommend that you add an ObjectQualifier to your database. What this does is append to the beginning of each table name in the DotNetNuke database (in this case, ‘dnn_fingerfuel’), a prefix, which will make it harder for your website to be attacked, if hackers do not know the tablenames. You can add anything you want. Here’s what I added:
<data
defaultProvider="SqlDataProvider">
<providers>
<clear/>
<add
name="SqlDataProvider"
type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider"
connectionStringName="SiteSqlServer"
upgradeConnectionString=""
providerPath="~\Providers\DataProviders\SqlDataProvider\"
objectQualifier="dnn_fingerfuel"
databaseOwner="dbo"/>
</providers>
</data>
Be forewarned. There are modules out there, which are poorly written, and do not take into account an object qualifier when they install. So there is a chance that if you have an ObjectQualifier, these poorly written modules will not install. Personally, I consider it a ‘module quality filter’. If the module install does not take into account your ObjectQualifier, chances are there are other issues with the module. Either way, you can contact the module developer and let them know of the issue. |