windows-services

Importing data through API for thousands of users by using threads

In our application we need to import transaction data from paypal through an API for the users of my application and store in the database. I've thousands (approx 5k now) of users and it is increasing day by day. This application is a .net windows service. This imports data on hourly basis for all the users. At present we are importing...

Thoughts on running Windows Service type apps on ASP .NET 4 with StartMode="AlwaysRunning".

Hi, Usually I would look at writing a Windows Service to manage tasks that aren't suited to being hosted in a web application. These types of tasks are usually long running processes or scheduled tasks. Although this is normally the primary approach for these types of tasks, people have looked at ways of running these kinds of backgroun...

"There is insufficient memory. Save the document now." error while opening word 2003 document

Hi, I have developed one windows service through which I am trying to open an word document. But when service tries to open document, it logs following error "There is insufficient memory. Save the document now." If I run the same program as normal windows application, it works fine but problem comes only when I try to run the program...

Windows Service without [RunInstaller]

I wrote a Windows Service using C#.NET. To install the service, I've added a "Project Installer" class that inherited from the Installer class and decorated with the [RunInstaller]. Without the [RunInstaller] decoration, I cannot install the service using installutil. Why is it that by deploying the service using the ServiceInstall tab...

Offline Processing of POST Request

I am developing an Application where I am submitting POST Requests to a .NET Web Service. Current implementation is to process the request instantly and give response. In actual deployment, there will be huge amount of data that needs to be processed and thus the request must be processed offline. What are the strategies that can have ...

How to Run an exe from windows service and stop service when the exe process quits?

I am a complete beginner to working with windows services. I have a basic skeleton worked out for the service and I am currently doing this: protected override void OnStart(string[] args) { base.OnStart(args); Process.Start(@"someProcess.exe"); } just to fire-off the exe at the start of the program. However,...

Windows Service won't automatically start after reboot

My automatically starting windows service fails to start only on reboot. I have a windows service created in C# and installed via a Wix created installer. The service is set up to start automatically. The service is installed and run under the NT AUTHORITY\NETWORK SERVICE. When the service is started, it first makes an external web ser...

Topshelf hosting application debugging in VS2010

I'm trying to use the Topshelf hosting application Topshelf.Host.exe to execute my .NET Class Library as a Windows service. http://topshelf-project.com/documentation/shelving/ I'm having trouble hooking up the debugger inside VS2010. Here's what I have setup Topshelf.Host.exe at say c:\projects my classlibrary service building to c:\...

Can't delete a service executable after uninstalling it

I'm uninstalling a service like this: using (AssemblyInstaller installer = new AssemblyInstaller(serviceFileName, new String[] { })) { installer.UseNewContext = true; installer.Uninstall(null); } which works fine, but then I try to do a Directory.Delete, and it throws an exception saying that access to the service's executable...

windows service memory usage

I'm currently creating a windows service that will do some update on the database and send email on a timely manner. My issue is that as i run the service, the memory usage increases by 8kb (starts by 18,000kb+) and I'm not sure if it is normal as it would increase after some months/years. I removed any calls from database as well as sen...

Application as Service Win server 2003

I want to make a service from a .exe file. To do this i can use software like FireDaemon or ExeToServices but i want to do it with sc.exe. But I don't know how to do this, i have to add a paramater afther the specific .exe path like: "C:\Program Files\Server1\example.exe" +set fs_game 1 How can i do this? ...

SVNserve giving Error 1053 The service did not respond to the start or control request

I have installed SlikSVN and I'm trying to set up svnserve. SlikSvn is installed in C:\Program Files\SlikSvn and C:\Program Files\SlikSvn\bin is in the path. the registry entry for the service is currently svnserve.exe --service -r "C:\SVNReposities" DisplayName= "Subversion" depend= Tcpip start= auto however when I try and start the...

Communication web-windows server: Proxy DLL, web-services or windows service + WCF?

I have a decent sized chunk of .NET code that now needs to be accessed by an ASP web page. Transactions need to be sent at regular instances to this "server" for processing. Processing takes less than a second and there are maybe 100-1000 such transactions a day I've really only worked with COM and windows services before, so my normal ...

Finding stack overflow exceptions in a windows service

I have inherited a large and complex C# windows service project that crashes every now and then. The logging system is not logging any messages which I initially thought strange but I now understand that logging might fail if there's a stack overflow or out-of-memory exception. So one of the tasks that I have is to try and find any recu...

Tools/techniques for diagnosing C app crash on Windows

I have written an application in C, which runs as a Windows service. Most users can run the app without any problems, but a significant minority experience crashes caused by an Access Violation, so I know I have a bug somewhere. I have tried setting up virtual machines to mirror the users' configurations as closely as possible, but canno...

How to use named mutex and shared memory between a windows service and a process ?

Hello all, I'm have a code written in C++\MFC that is run as a Windows Service and a (normal) C++\MFC Windows process - now I wish to communicate between the two using named Mutex and Shared memory (File mapping). How is that possible ? ...

Where should a windows service write files to

I have a windows service which needs to write some files to disk, if I don't specify a path it tries to write them to system32 folder which throws an exception because the service is being executed under the localservice account, I would like to know which is the recommended location to save this files and which folder I could use so I d...

WCF Windows Service not releasing resources/memory after every call.

I have created WCF application which is running on Windows Service. It was installed using Windows Installer. I have followed procedure mentioned in following article for same. http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic4 Most WCF properties are kept as default for net.tcp protocol, per call instance and so on...

How do I install a windows service that runs as an administrator?

I've written an installer that installs a windows service (A) that needs to start/stop another service (B). However, when A tries to start/stop B, I get this exception: System.InvalidOperationException: Cannot open MyService service on computer '.'. ---> System.ComponentModel.Win32Exception: Access is denied The installer installs the ...

Windows Service works when testing but not as Service

I created a Windows Service that watches a directory using FileSystemWatcher and when a file is put into the folder it zips it. All the functionality is in a class I created named FileProcessor. When I create a Console app that uses FileProcessor the automated zipping works great. However, when I run the class in the Windows Service i...