Solved

Delphi Service Application and FileExists(FileName) over network

Posted on 2003-10-23
6
1,268 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
6 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 20 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now