473,320 Members | 2,162 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,320 software developers and data experts.

VB.Net Windows Service Issue

Hello Everyone,

I am stuck with a minor issue related to a Windows Service made in VB.Net (framework 2.0). The service is working as expected for few printing documents and not for others.

The actual expectation for Windows Service is to periodically check for new Work Orders raised and print the respective WorkOrder (MS-Word) document on a predefined network printer. This is done perfectly fine, barring few word documents and I am not sure for what reason. Let me know in case if you would like to have more information to help me.

Regards,
Saurabh
Nov 20 '08 #1
4 1314
balabaster
797 Expert 512MB
A concurrency issue maybe? Can you obtain an exclusive lock on the files?

I mean, really, there could be any number of issues, but assuming you've chased down the obvious ones like: is the file in the right place, does the code have a bug, is the service enumerating all the files correctly etc:

It maybe that printing is never attempted for these files... I could sit here and postulate all day long as to what might be the issue. Make sure you've checked the obvious things and get back to us...
Nov 20 '08 #2
PRR
750 Expert 512MB
Put your code in try catch block and write to a file in catch block .. that way you will know if there is any exceptions... and let us know more ...:)
Nov 21 '08 #3
A concurrency issue maybe? Can you obtain an exclusive lock on the files?

I mean, really, there could be any number of issues, but assuming you've chased down the obvious ones like: is the file in the right place, does the code have a bug, is the service enumerating all the files correctly etc:

It maybe that printing is never attempted for these files... I could sit here and postulate all day long as to what might be the issue. Make sure you've checked the obvious things and get back to us...
I have checked the guesses you mentioned. I have maintained the event log, but it does not throw any error. the method document.printout is used where document is an object (automation server) for Word (2000) document class. the same method prints few documents and not others. The strange point here is that it spools all pages when printed using a loop for the number of pages in document, but it still does not print from the queue. And when I print the whole document it does not go beyond a certain page. Since this is happening for only selected few documents, i m not able to trace the issue.

Let me know in case if you would like to have more information to help me.
Nov 21 '08 #4
PRR
750 Expert 512MB
"periodically check for new Work Orders raised and print the respective WorkOrder (MS-Word) document on a predefined network printer."
System.Timers.Timer? which timer are you using?
Does it have any dependency?(with other service?)
Also are you using threading for processing?
Nov 21 '08 #5

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

Similar topics

0
by: big A | last post by:
I am experiencing an issue that i have seen posted with various descriptions but lacks any answers. I have .Net Framework 1.1 services that run without issue on windows 2000 professional; however...
5
by: Dhilip Kumar | last post by:
Hi all, I have developed a windows service using the windows service project template in VS.NET. I have used three controls in the service, a timer, performance counter and a message queue...
3
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
10
by: Ger | last post by:
I am having problems using VB.Net's Management base object on a machine hosting Windows Server 2003. I am trying to set file permissions from a Windows Service. These files may be loacted on a...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
4
by: Lenny Shprekher | last post by:
Hi, I have long time ago written windows service (VS2002) which is working fine on Windows 2000 server for 4 years. After installing service on Windows 2003 SP1 service crashing every time with...
1
by: jehugaleahsa | last post by:
Hello: I wrote an .exe that I would like to be called by a service I am deploying to a server. However, I am not sure how to tell the setup project to include the .exe. Also, I do not know...
41
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.