Solved

Delphi Service Application and FileExists(FileName) over network

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle global variables 4 80
How to define IfThen functions in one common unit? 4 62
creating threads in delphi 1 158
migrate this code to work on android 1 27
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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 …

740 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