473,815 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converted app to a Windows Service


I have an application that was converted from a VB application to a
windows service.

I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.

The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folde r

I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.

However, when I put it in the application, it won't read it in.

The application is started as a Windows service, is enabled, and starts
& ends fine. I set the Log On account to be one that has local
administrator rights on the application server (Server1), and also has
local administrator rights on the data source (Server2).

How do you give a Windows Service (ie \\Server1\Myser vice)
read/write/delete permissions in a folder on another server (i.e.
\\Server2\Mydat a)?

If I copy the file over to the local app server (Server1), into a local
folder, the application will run fine. However, that's an extra step I
don't really want to add to running this job each day.

Any help appreciated
BC

Apr 19 '07 #1
4 1329
On Apr 19, 10:39 am, Blasting Cap <goo...@christi an.netwrote:
I have an application that was converted from a VB application to a
windows service.

I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.

The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folde r

I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.

However, when I put it in the application, it won't read it in.
What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?

Apr 19 '07 #2

Right now, I have it set to put out info into the event log, each time
it checks for the file. If it's local, I'll see events out there, no
problem.

If I specify \\Server2\folde r as it's input, versus
[Server1]D:\DailyInput, it just sits there - nothing at all written into
the event log. It appears not to run, unless the source for it is local.


Chris Dunaway wrote:
On Apr 19, 10:39 am, Blasting Cap <goo...@christi an.netwrote:
>I have an application that was converted from a VB application to a
windows service.

I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.

The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folde r

I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.

However, when I put it in the application, it won't read it in.

What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?
Apr 19 '07 #3
On Apr 19, 11:15 am, Blasting Cap <goo...@christi an.netwrote:
Chris Dunaway wrote:
On Apr 19, 10:39 am, Blasting Cap <goo...@christi an.netwrote:
I have an application that was converted from a VB application to a
windows service.
I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.
The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folde r
I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.
However, when I put it in the application, it won't read it in.
What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?
Right now, I have it set to put out info into the event log, each time
it checks for the file. If it's local, I'll see events out there, no
problem.

If I specify \\Server2\folde r as it's input, versus
[Server1]D:\DailyInput, it just sits there - nothing at all written into
the event log. It appears not to run, unless the source for it is local.
Are you using exception handling in your code? Are you swallowing the
exceptions if any are generated?

Chris

Apr 19 '07 #4
The program was swallowing the exceptions. It had a configuration file
with it (XML) that provided the source & destination folders - the
problem was leaving a slash off one of those configuration lines. That,
and having it log in as a local service. Once I changed it to an
account that had administrator rights on BOTH servers, and corrected the
syntax error on the config file, it ran fine this morning.

Thanks for the help.



Chris Dunaway wrote:
On Apr 19, 11:15 am, Blasting Cap <goo...@christi an.netwrote:
>Chris Dunaway wrote:
>>On Apr 19, 10:39 am, Blasting Cap <goo...@christi an.netwrote:
I have an application that was converted from a VB application to a
windows service.
I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.
The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folde r
I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.
However, when I put it in the application, it won't read it in.
What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?
>Right now, I have it set to put out info into the event log, each time
it checks for the file. If it's local, I'll see events out there, no
problem.

If I specify \\Server2\folde r as it's input, versus
[Server1]D:\DailyInput, it just sits there - nothing at all written into
the event log. It appears not to run, unless the source for it is local.

Are you using exception handling in your code? Are you swallowing the
exceptions if any are generated?

Chris
Apr 20 '07 #5

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

Similar topics

9
7274
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service stopping. Please advise how to stop the service. Thanks, SP
1
3456
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm going wrong. The program has been written to do the following tasks: - Select remote server - Select from two specific services
0
3945
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server - Select from two specific services - Check the status of the server
2
6904
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no service required. But... "A windows service enables the creation of long-running executable
5
1469
by: Blasting Cap | last post by:
I have a VB6 program that runs as an app, that I want to both convert it to vb.net, and run it as a service on the server. I have been able to create the service, and what I did was to open the vb6 document and convert it into a vb.net program. Once I did that, the routine "check_for_file" I yanked out & put into my service program. The program though - doesn't work like the existing VB6 one does.
4
4186
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
0
874
by: Chakravarthy | last post by:
We have a windows application which passes a dataset to a web service which then hands it to the business and data layer. When we have a date time column in the dataset, the web service seems to convert the datetime columns to it's time zone . I learnt that this was a known issue in 1.0 and 1.1 from this blog :-. http://blogs.msdn.com/brada/archive/2004/04/13/112784.aspx
2
2167
by: Chris Paxton | last post by:
I have a fairly basic VB.NET application that I converted from VS2003 to VS2005 and now it crashed the VS2005 IDE pretty regularly while trying to use the form designer. I've removed any 3rd references in my projects and recoded methods to remove any deprecated functions. Anyone have any suggestions?
5
3313
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? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
0
9736
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
9611
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,...
0
10672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10428
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
10145
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...
1
7687
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
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
5570
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...
0
5710
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.