|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.Net Windows Service ...data access problemHi,
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 On Tue, 1 May 2007 15:10:03 +0100, Samuel Rhodes wrote:
Show quoteHide quote > Hi, What error message do you get?> 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
Show quote
Hide quote
"Rad [Visual C# MVP]" <nospam@nospam.com> wrote in message The error message isnews:3rjv8egv6w4x$.dlg@thinkersroom.com... > On Tue, 1 May 2007 15:10:03 +0100, Samuel Rhodes wrote: > >> 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? > -- > Bits.Bytes > http://bytes.thinkersroom.com "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
Other interesting topics
The Interlocked on the Edge of Forever
Determining if two paths are the same System.Speech Questions about clickOnce some config error happens periodically only Interface & Event Any groups created for WPF / WCF ? Directory Sizes and Performance Installation problem - MSDN Libs for VS2005 Service running Infinitely |
|||||||||||||||||||||||