.Net Windows Service ...data access problem

S

Samuel Rhodes

Hi,
I am writing a .NET windows Service that will access the database every 10
minutes. When the service calls the function in the business services layer
which in turn calls the correponding function in data access layer, this DAL
function fails. The reason 'apparently' being that the it can not read the
connection string information and hence can not create the database
connection.

Please note that that I am using enterprise library. All the projects
representing business service layer, DAL, Model, Web UI and also the the
windows service project are all in the same solution.

Can anyone tell me what should I do to get around this problem.

Thanks

-Sam
 
R

Rad [Visual C# MVP]

Hi,
I am writing a .NET windows Service that will access the database every 10
minutes. When the service calls the function in the business services layer
which in turn calls the correponding function in data access layer, this DAL
function fails. The reason 'apparently' being that the it can not read the
connection string information and hence can not create the database
connection.

Please note that that I am using enterprise library. All the projects
representing business service layer, DAL, Model, Web UI and also the the
windows service project are all in the same solution.

Can anyone tell me what should I do to get around this problem.

Thanks

-Sam

What error message do you get?
 
S

Samuel Rhodes

Rad said:
What error message do you get?


The error message is

"The requested database SharedDB is not defined in configuration."

where SharedDb respresents the db configuration store in the web.config
file. and by the way this web.config is offcourse in the Web UI project.

-Sami
 

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