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

File query not working when vb runs as a service

Hi all, I have a vb.net program running as a service that uses a network
path to query a file.

If System.IO.File.Exists(fpath & "\" & filename)

Can anyone tell me why the above isn't working? When I place it in a none
service program it works fine.
Any help appreciated.
Thanks in advance.
Jun 19 '06 #1
4 1305
Hello Mike,

You services starts under account that has no rights to the network.
Grant this righs manually

M> Hi all, I have a vb.net program running as a service that uses a
M> network path to query a file.
M>
M> If System.IO.File.Exists(fpath & "\" & filename)
M>
M> Can anyone tell me why the above isn't working? When I place it in a
M> none service program it works fine.
M>
M> Any help appreciated.
M>
M> Thanks in advance.
M>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jun 19 '06 #2
Under what username do you start your service.
The default user used to start services has extremely restricted (if not
none) rights in regards of Network access.

What you could do is to define a special user for your service with the
rights you need.

- José

"Mike" <wa*****@swbell.net> a écrit dans le message de news:
BS********************@newssvr29.news.prodigy.net. ..
Hi all, I have a vb.net program running as a service that uses a network
path to query a file.

If System.IO.File.Exists(fpath & "\" & filename)

Can anyone tell me why the above isn't working? When I place it in a none
service program it works fine.
Any help appreciated.
Thanks in advance.

Jun 19 '06 #3
I'll try that thanks.

"José Joye" <jo*************************************@bluewin.c h> wrote in
message news:eu**************@TK2MSFTNGP05.phx.gbl...
Under what username do you start your service.
The default user used to start services has extremely restricted (if not
none) rights in regards of Network access.

What you could do is to define a special user for your service with the
rights you need.

- José

"Mike" <wa*****@swbell.net> a écrit dans le message de news:
BS********************@newssvr29.news.prodigy.net. ..
Hi all, I have a vb.net program running as a service that uses a network
path to query a file.

If System.IO.File.Exists(fpath & "\" & filename)

Can anyone tell me why the above isn't working? When I place it in a none
service program it works fine.
Any help appreciated.
Thanks in advance.


Jun 19 '06 #4
That was it. Thanks all for the help.
"José Joye" <jo*************************************@bluewin.c h> wrote in
message news:eu**************@TK2MSFTNGP05.phx.gbl...
Under what username do you start your service.
The default user used to start services has extremely restricted (if not
none) rights in regards of Network access.

What you could do is to define a special user for your service with the
rights you need.

- José

"Mike" <wa*****@swbell.net> a écrit dans le message de news:
BS********************@newssvr29.news.prodigy.net. ..
Hi all, I have a vb.net program running as a service that uses a network
path to query a file.

If System.IO.File.Exists(fpath & "\" & filename)

Can anyone tell me why the above isn't working? When I place it in a none
service program it works fine.
Any help appreciated.
Thanks in advance.


Jun 23 '06 #5

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

Similar topics

7
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be...
6
by: Dan V. | last post by:
Is there a way to query a remote xml file periodically by not using web services? For Windows and Unix platforms. Is there a cheap software product that I can install on each client and my Windows...
3
by: Jørn A. | last post by:
I'm working on a web based user interface for a job scheduling system (running scripts). The system is using a non-windows scheduler software, but it's installed and running as a windows...
6
by: Aspiring .NET Programmer | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
6
by: Marc Castrechini | last post by:
This is a classic double hop delegation issue, however its the first time we are setting this up so we are doing something incorrectly. If we run through the IDE or using a localhost path on the...
1
by: noah.blumenthal | last post by:
I wrote a windows service in c# (applause) and now I want to add the ability to edit its settings. Basically this service checks an email account at certain intervals and forwards the emails to...
3
by: Crash | last post by:
VS 2003 ..NET 1.x Windows 2000 SP4 Hi all, We recently migrated a data center containing several database and ASP web service servers. We have a Windows Forms application that runs on 200+...
10
by: =?Utf-8?B?cm1jb21wdXRl?= | last post by:
I have Windows 2000 and recently included Internet Information Services. I then created a simple ASP file and clicked on it. The Open With dialog appears asking me to select a program. I copied...
6
by: =?Utf-8?B?RGF2aWRN?= | last post by:
Hello, I have an XML file generated from a third party application that I would like to parse. Ideally, I plan on having a windows service setup to scan various folders for XML files and parse the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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...

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.