473,799 Members | 3,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

windows service not working for everyone.

63 New Member
Hi I have already posted this question before.I got a work around but doesn't seem reasonable.

I developed a windows service and I installed it in our server.everybod y in the office has access to a folder in the server.anybody can put a file in that shared folder and the service has to pick it up. but it does not pickup for everyone. it just picks up for some users. and the strange thing is it pickes up for rest of the users also but ocassionally.

Iam not getting how to make it work consistantly. any ideas on this issue.

does it have to work under admin account. if so what should i do for that.

please help!
Ayush
Sep 15 '08
30 3616
PRR
750 Recognized Expert Contributor
after a lot of work i found a work around not a solution though.i used Thread.Sleep(60 00); and also i placed FileWatch_Creat ed code in if loop saying if any file exists then read it else go to FileWatch_Creat ed again.

because as i increase the time in thread.sleep the service was getting delayed. so now till the service finds a file it will remain in the if else loop. it wont be a infinite loop since it is going to find a file eventually. there is a creation of file that is why it has entered into FileWatch_Creat ed event.

i dont think this is the best method but it worked.
Thanks to all who helped.

Ayush
good work finally you cracked it....
Sep 17 '08 #31

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2248
by: Andrei Prodan | last post by:
Hi everyone, I have a small piece of code which uses GetObject function and it is working fine in a windows application developed under .NET In a windows service application, the GetObject function returns an error: "Cannot create ActiveX component" Does anyone knows why ??
4
5926
by: Simon Niederberger | last post by:
Hi I need to create a MessageQueue in my C# service (running as SYSTEM). Users will have no permissions on this queue, so I can't look if messages are present. When setting MessageQueue.SetPermissions, I have the problem of knowing the Windows Group Name. I'd like to set Full Control to either Users or Everyone (doesn't really matter), but the service might run under English (Users, Everyone) or German Windows (Benutzer, Jeder). On a...
4
2237
by: Tim Golden | last post by:
Tim Golden enlightened us with: > > Well, I'm with you. I'm sure a lot of people will chime in to point > > out just how flexible and useful and productive Linux is as a > > workstation, but every time I try to use it -- and I make an honest > > effort -- I end up back in Windows > I'm curious, what do you mean with "it" in the part "every time I try > to use it"? Fair question. I have, over the years, installed and used Gentoo,
4
15897
by: Keith | last post by:
I'm in the same boat as the fellow who posted this message back in August: Title : Windows Service, How does one make a service "fail" properly? Author : Ross Bennett Group : microsoft.public.dotnet.languages.csharp URL :...
7
3925
by: Simon Harvey | last post by:
Hi everyone, I need to make a service that monitors a directory for changes in the files contained within it. I have two questions: 1. I'm going to be using a FileSystemWatcher object to do the monitoring - but do I need to somehow involve another thread to allow the service to do other stuff as well, or is another thread created automatically when the FileSystemMonitor object is created?
0
1308
by: pithhelmet | last post by:
Hello everyone - I need to create a windows service that will watch for a specific dialog, and when found, send a keypress to the dialog. I have the service working, but when it tries to find the window (dialog) it always comes back with zero. Now - in my test application (not service) it runs fine....
0
2670
by: artsohc | last post by:
Hey Everyone, this is my first time posting so go easy on me. I am trying to hook up music-on-hold at the office I work at. I got all the music loaded and I got Windows Media Player working while the phones are on hold, but now I am trying to write a script that will allow Windows Media Player to run as a service so I can make it auto-start with out needing a user logged in on the computer. Also it would allow the music-on-hold to work if we...
1
2002
by: icecroft | last post by:
Hello everyone! We're running a windows service application and it gets this error: "the service did not respond to the start or control request in a timely fashion". It works in most machines but for these 2 other machines (from our consultant & client), one is running on WinXP and the other is Windows Server 2003, the application doesn't seem to run. In addition to this, the WinServer2003 machine logs this error in the System event...
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10231
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.