[Lazarus] Write to UNC or mapped drive

Santiago A. svaa at ciberpiula.net
Wed May 25 20:58:11 CEST 2016


El 24/05/2016 a las 21:46, Leonardo M. Ramé escribió:
> Hi, My app is a CGI running on Windows2012 (IIS 7.0), it needs to save
> a file to a remote UNC or Mapped drive, but when I check using
> DirectoryExists in both cases I get False, but of course the UNC and
> mapped drive exists.
>
> Any hint?.
>
> Regards,
Not sure 100%, but I think that mapped drives only work  when a user
opens a desktop session. Services don't know about mapped drives. Think
of it, in the same server, different users may map the same network
resource with a different letter.

Instead of mapped drives I think you should use \\server\resource, and
the user who runs the service that calls the CGI must have permission on
that resource. If the service is run as "Local system", I don't know how
to grant permission in a remote machine.

-- 
Saludos

Santiago A.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160525/ca11f461/attachment-0003.html>


More information about the Lazarus mailing list