Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi Service Application and FileExists(FileName) over network

Posted on 2003-10-23
6
Medium Priority
?
1,413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

730 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