Enterprise Library- Data configuration Block

G

Guest

I am using the Microsoft enterprise Library (June 2005) with .NET Framework
1.1 on a Windows 2003 IIS6 web server.

with an ASP.NET 1.1 application, I have a dataConfiguration.config as listed
at the end of this post(configured with the Enterprise Library Configuration
Tool)

I have this file in a "production" environment and what I found is that if I
use the SQL Server 2000's Enterprise Manager's Current Activity viewer under
the Management node on the DEV and PRDO SQL Server, I could detect connection
from .Net SqlClient Data Provider from the IIS Host. What is going on?

I want to leave the 2 settings there (if possible) and change 1 setting for
Prod IIS to point to prod DB.

Help!

<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
<xmlSerializerSection
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral,
PublicKeyToken=null">
<enterpriseLibrary.databaseSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
defaultInstance="appDev"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
<databaseTypes>
<databaseType name="Sql Server"
type="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase,
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" />
</databaseTypes>
<instances>
<instance name="appDev" type="Sql Server" connectionString="DEV" />
<instance name="appProd" type="Sql Server" connectionString="PROD" />
</instances>
<connectionStrings>
<connectionString name="DEV">
<parameters>
<parameter name="database" value="appDB" isSensitive="false" />
<parameter name="password" value="pppassword" isSensitive="true"
/>
<parameter name="server" value="ProdServer" isSensitive="false" />
<parameter name="uid" value="uid" isSensitive="false" />
</parameters>
</connectionString>
<connectionString name="PROD">
<parameters>
<parameter name="database" value="appDB" isSensitive="false" />
<parameter name="password" value="pppassword" isSensitive="true"
/>
<parameter name="server" value="prodServer" isSensitive="false" />
<parameter name="uid" value="uid" isSensitive="false" />
</parameters>
</connectionString>
</connectionStrings>
</enterpriseLibrary.databaseSettings>
</xmlSerializerSection>
</dataConfiguration>
 
M

Matt Noonan

Patrick said:
I am using the Microsoft enterprise Library (June 2005) with .NET
Framework
1.1 on a Windows 2003 IIS6 web server.

with an ASP.NET 1.1 application, I have a dataConfiguration.config as
listed at the end of this post(configured with the Enterprise Library
Configuration Tool)

I have this file in a "production" environment and what I found is
that if I use the SQL Server 2000's Enterprise Manager's Current
Activity viewer under the Management node on the DEV and PRDO SQL
Server, I could detect connection from .Net SqlClient Data Provider
from the IIS Host. What is going on?

I want to leave the 2 settings there (if possible) and change 1
setting for Prod IIS to point to prod DB.

Help!

If I understand your question, I think all you need to do is change the
defaultInstance="appDev" to "appProd". Unless you are specifying an instance
name in your CreateDatabase calls, the DAAB will use the defaultInstance.

Or did I miss something?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top