Configuration block behavior in n-tier application

K

karthick

Hi:
I have an n- tier application where a web app calls a web service to
get/set info. My web app is configured to use the caching, exception
and logging block of the june version of Enterprise library application
blocks. The Web service is configured to use the data access block.
when i make a call from the web app, when execution comes to the line
Dim myDatabase As Database = DatabaseFactory.CreateDatabase()

it takes you to
public static Database CreateDatabase()
{
using(ConfigurationContext context =
ConfigurationManager.GetCurrentContext())
{
DatabaseProviderFactory factory = new
DatabaseProviderFactory(context);
return factory.CreateDefaultDatabase();
}
}

the context object's configuration file property points to the web
applications web.config.
How do i specify that the context information should be obtained from
the web service's web.config. I would like to avoid any direct referece
or "hard coding" web service's web.config in my web app's web.config.
any help or explaination is much appreciated.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top