Can't get ASP.Net to access remote folder share
From: Garrek (garrek_no_spam_2001_at_hotmail.com)
Date: Sun, 16 May 2004 02:25:54 -0500
I have a WebService executing on one server in a workgroup which needs
to reach out to a folder share on another server for read/write access.
I've created an identical user account on both systems (matching in
username and password). I've approached the problem by writing a
utility class that calls the Win32 API LogonUser method. The idea was
to have the code temporary impersonate the user account, access the
remote UNC folder share, and then return the context back to normal.
The problem is that well... it's just not working =) As soon as I
call File.Exists(filePath) I always get a false return signifying the
file doesn't exist or I don't have access. Now I've confirmed the user
account on the remote system has read/write permission on the share.