Tuesday, September 19, 2006

I was unable to find the documentation or a code sample that described how to configure the connectionString node in the dataConfiguration.config for the Data Access Application Block 2.0 (DAAB). I searched the web and Google groups and each example shown used Integrated Security. So, I had to take a look at the DAAB source code to figure out which parameters I needed to configure.

In Data Access Application Block 2.0 To specify the connection strings for both integrated security and SQL security, you configure the dataConfiguration.config file:

This will configure the DAAB to use SQL Security:

<connectionStrings>
<connectionString name="SQLSecConnStr">
<parameters>
<parameter name="database" value="Database" isSensitive="false" />
<parameter name="uid" value="Test" isSensitive="true" />
<parameter name="pwd" value="Test" isSensitive="true" />
<parameter name="server" value="WWW.XX.YY.ZZ\SQLInstance" isSensitive="false" />
</parameters>
</connectionString>
</connectionStrings>

This will configure the DAAB to use Integrated Security:

<connectionStrings>
<connectionString name="IntSecConnStr">
<parameters>
<parameter name="database" value="Database" isSensitive="false" />
<parameter name="Integrated Security" value="true" />
<parameter name="server" value="WWW.XX.YY.ZZ\SQLInstance" isSensitive="false" />
</parameters>
</connectionString>
</connectionStrings>

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?