473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Windows Services and Enterprise library DAAB

Jac


Hey,

Is it possible to use Enterprise Library in a Windows Service?

I work in VS2005 and made an Windows Service, but I don't see an
app.config file. So, I created one appname.exe.config.

Then I went to the enterprise configuration tool to set my connection
string (I did the same in a WindowsForm application and it worked).

The appname.exe and the appname.exe.config I set under
C:\Program Files\Default Company Name\appname

When I start the service it always stop immediately with that error :
"The AppName service on Local Computer started and then stopped. Some
services stop automatically if they have no work to do, for example, the
Performance Logs and Alerts service."

If I run the service with
Database db = DatabaseFactory.CreateDatabase(); in comments then it
starts and run normally.

I don't see why it don't work in a Windows service.

Thanks,
nic

*** Sent via Developersdex http://www.developersdex.com ***
Jan 8 '07 #1
2 1907
"Jac" <ja*@vt4.bewrote in message
news:uE**************@TK2MSFTNGP04.phx.gbl...
I work in VS2005 and made an Windows Service, but I don't see an
app.config file. So, I created one appname.exe.config.
1) Copy the values from appname.exe.config

2) Right-click the project, then click Add, New Item

3) Highlight Application Configuration file and click OK

4) Copy the values into the new app.config file - when you compile your
service, its name will be changed automatically for you...
Jan 8 '07 #2
Jac


thanks, I didn't know that.

The rest I found also. My fault was that I didn't copied the
enterprise.dll 's to the directory where the service is running.

*** Sent via Developersdex http://www.developersdex.com ***
Jan 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Chamberlain | last post by:
Hi all. I'm trying to extend the Microsoft Enterprise Library Data Access Application Block (http://msdn.microsoft.com/library/en-us/dnpag2/html/daab.asp?frame=true) to work with a Borland...
0
by: Vinny_Davis | last post by:
Hi - I installed Enterprise Library successfully. Under the DAAB area I am seeing two VS solution links. One says "Data" and another says "Data Design". What is the difference? Thanks, Vinny
2
by: David | last post by:
I have been developing applications with Java for quite a while but I am new to .NET development. I am trying to learn the ".NET way" of creating Strongly Typed Objects from a database. The...
3
by: craig | last post by:
I was just wondering if anyone else may have incorporated the original Microsoft Exception Management Application Block (EMAB) or Data Access Application Block (DAAB) into one of their applications...
7
by: rockdale | last post by:
hi, I just downloaded Microsoft Enterprise Library Jan 2006 and try to integrate it into my asp.net application. As i am going to connect to mySQL database, I need to include the source code in my...
5
by: Dick | last post by:
I have a .net 2005 class library project that relies upon the Data Access Application Block from the 2006 Enterprise Library. I want to call my project from a legacy VB6 application. Simple...
0
by: Dharmen Patel | last post by:
I am using Enterprise Library 2006 , Data Access Application Blocks. 1. I am connecting to Oracle 9i database using DAAB. 2. I retrieve a dataset using the following code in VB.NET. ...
4
by: =?Utf-8?B?QmVu?= | last post by:
Hi, I was wondering whether the Enterprise Library replaces Enterprise Services as a framework for providing services for enterprise apps, or it supplements it. I know nothing of either of...
4
by: Cirene | last post by:
I am using ASP.NET, .NET 3.5 FW and MySQL db. I was looking at the Enterprise Library Contrib Data Access Application Block....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.