windows-services

WCF works as appliction, but not as service

I have a WCF server that I can run as a service or as a windows forms application. When I run it as a Windows Forms application I can connect to it via my client application. However when I run it as a service using the same code, I cannot connect to it. I have confirmed that the service is running and doing its work. Below is the server...

is dataset.readxml(string) synchronous?

I'm asking that because I created a windows service and it seem that under heavy load(which in my case when windows is booting up) the data inside the xml doesn't get loaded before I manually do stuff with it in my case is checking how many row are in a specific datatable inside that dataset. dataset got a schema. speudo code would be:...

database connection doesn't work when service starts at boot but works when it's manually started

I'm trying to track down possible causes of my app not being able to connect to a db server. I have a windows service that connects to the database when it starts. The service runs on machines with a reliable wired network connection. It's installed with startup Automatic so normally it starts when windows does, and in almost all cases...

Windows Service Application Controller

Here is the premise: I have a desktop that I need to be able to start up and stop applications on, but cannot get remote access to. What I had in mind is setting up a service on the machine that will start/stop a list of applications as told. This windows service will periodically pole a web service for new commands and execute them acc...

Calling Windows Service from a Web Service

I am using .Net 2.0 framework and would like to call a function in Windows service from a web service. Is this possible? And If yes, how much control I will have over the function i.e passing parameters, getting the result back etc. Any ideas would be greatly appreciated :) ...

Vista + VB.NET - Access is denied while trying to start/stop a Windows Service from within an application

I get the following error in Vista while trying to start/stop a Windows Service that I created. Cannot open ServiceName service on computer '.'. The same code works for XP. What should I do to solve this problem? ...

Windows Service in .net cannot resolve tns service name

I have moved a component of our application from a webservice to a Windows Service. It connects to oracle perfectly from the webservice but refuses to see the Tns names from the Windows service. I have given full control to the ORAHOME dir to the account the service is running under. I have also checked the service account permission t...

How to stop worker threads in a multithreaded Windows service on service stop

I have a Windows service that uses the producer/consumer queue model with multiple worker threads processing tasks off a queue. These tasks can be very long running, in the order of many minutes if not hours, and do not involve loops. My question is about the best way to handle the service stop to gracefully end processing on these work...

C#: Running and Debugging a Windows Service

I am currently building a Windows Service with C# and I just can't figure out how to debug it. I am building it and then registering with installutil: > installutil MusicRepo_FileMonitor.exe The Commit phase completed successfully. The transacted install has completed. And as you can see above, it is supposedly being registered s...

windows services

Is it possible to create a windows service which will be unstoppable until the machine gets shutdown. Because I want to run one of my applications along with the service, is it possible to do it? Thanks, just tell me how to run my application along with the service. ...

Is this an appropriate use of the ThreadPool? Can I be sure it'll start a thread for each task?

protected override void OnStart(String[] args) { ResultManager.PrepareCache(); ThreadPool.QueueUserWorkItem(ResultQueue.Process); ThreadPool.QueueUserWorkItem(StatusUpdater.UpdateStatus); ThreadPool.QueueUserWorkItem(GeneralQueue.RestartHungTests); ThreadPool.QueueUserWorkItem(ResultManager...

Does Windows Vista prevent windows services from accessing the internet or USB hardware?

I have created a Windows service that will run an exe file periodically to check for files on an FTP site, process any that are found, enter data into an SQL database and print a label to a local printer. Currently we are running Windows XP Professional but if we moved to Vista (or Windows 7) would the increased security prevent my serv...

How reliable is windows task scheduler for scheduling code to run repeatedly?

I have a bit of code that needs to sit on a windows server 2003 machine and run every minute. What is the recommended way of handling this? Is it ok to design it as a console service and just have the task scheduler hit it ever minute? (is that even possible?) Should I just suck it up and write it as a windows service? ...

Windows Service, how can I uninstall from VS Setup project?

Hi There, I have created a windows service, it works great, but as soon as I try to install the service, it removed the directory, however, the service did not get removed, and when I try to install the service again, it give me an error 1001: Service already exists. How can I fix that? And also, is there any code for me to remove the ...

How do I get a valid user token for CreateProcessAsUser?

I have an application that is running as normal user, and a service running as local system. I want the application to be able to tell the service to start the application again, once the service has done some other stuff. (So the application will not be running while the service is doing it's "thing".) In order for the service to be abl...

Printing a report from a windows service

We need to print a report periodically from a windows service, we use .NET 2.0. We have modules that produce this report as a PDF or as an HTML file, PDF would be better because we have better control over the look of the report. We also have the username, password and the name of the printer selected for the task. I searched and resear...

Update ASP.Net membership from windows service

I am working on a project for a property management company. There is the back end system that stores all of the tenants and property portfolios, and a front end website that allows users to view their packages, service requests etc. I need to write a windows service that pulls their information out of the back end and place it into th...

WCF windows service issue with MSDTC

I've a .net 3.5 windows service which uses msmq running on 2008 application server.This service communicates with the sql 2005 database on the database server. Am getting an error mentioned below on calling this service from my aspx page on 2008 web server: "Network access for Distributed Transaction Manager (MSDTC) has been disabled. ...

Powerpoint Interop fails in a Windows Service but works fine in a Windows Form application

I've written an application to watch a folder, and whenever a PowerPoint document is dropped into it, it goes through the slides within it and generates png images of each slide. This works fine in a windows forms application but I've put exactly the same code in a windows service, used the same test file and it fails to open it with the...

Ninject kernel reference in win service

Hi all I have simple win service, that executes few tasks periodically. How should I pass Ninject kernel to all my task classes? Is it good idea to create static variable of base task class and initialize it on service start? ...