Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Delphi Service Application and FileExists(FileName) over network

Posted on 2003-10-23
6
Medium Priority
?
1,451 Views
Last Modified: 2007-12-19
Greetings

I have a drive mapping to my Novell Netware Server and are able to locate a file and get the Date and Time stamp information from it using FileDateToDateTime(AFileHandle).

This works 100% With a plain Delphi Application , but for some reason or the other I cant seem to get it to work with a Service Aplication.

I looked at the different options in the Services applet regarding login  because I thought the ServiceApp might not have enough rights. This did not solve my problem.

I did a test between a brand new serivce app and a traditional application and FileExists returns True in the Application but the service App returns false.

I pass a UNC path to the function, Like : \\10.10.0.7\sys\public\TheFile.html

Any reason WHY this does not work in a Service App.

Any pointers or Information would be greatly appreciated.

Regards
 Engwi
0
Comment
Question by:Engwi
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 80 total points
ID: 9613169
Hi,

Services usually log on using Local System Account which has no network rights. Make your service log on under your account, for example, and try again (stop it first !). Select the service and change its properties 'Log On' tab.

Regards, Geo
0
 

Author Comment

by:Engwi
ID: 9631662
Greetings

Well, I stopped the service app, gave it the login details of my administrator account, restarted and I stil get the same results ??

Any other Ideas. Maybe someone can confirm my findings or point out a mistake on my side.

Thanks in advance
0
 
LVL 17

Expert Comment

by:geobul
ID: 9632204
Hi,

You said that the same Delphi code worked well in a plain app but not in a service app. This definately means that you have a security issue (there is no problem in your Delphi code). For some reason your service can't login correctly (or is using a wrong account) and can't be authenticated against the server (computer 10.10.0.7). Did you use the same account for your service as you were logging interactively? Perhaps you've used the local administrator account (your workstation administrator) which is not defined on the server.

Regards, Geo
0
 

Author Comment

by:Engwi
ID: 9632331
Hello Geo

Regarding Authentication, I am logged into that server (10.10.0.7) via my Novell client. So I need to make sure that my service Application logs in with my Novell E-Directory details and not my Local system administrator.

Will try that shortly and let you know...

Regards
 Engwi

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question