Solved

Delphi Service Application and FileExists(FileName) over network

Posted on 2003-10-23
6
1,302 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 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