Accessing directories on a remote server

Results 1 to 2 of 2

Thread: Accessing directories on a remote server

  1. #1
    Join Date
    Dec 1969

    Default Accessing directories on a remote server

    Hi all. I&#039;m trying to use the GetFiles method to search for files on a remote server (located on the same domain however). Works fine when run locally, but I get stopped by the NT Authetication box when I deploy live. I can&#039;t really figure out what&#039;s asking for authentication, since I&#039;m allowing anonymous access to this directory. If it were the remote computer, it should have asked me when I tried it locally I think. Another quirk is that no login seems to satisfy this dialogue box. I&#039;ve tried local admins for both boxes, and domain admins as well.<BR><BR>I was hoping to use impersonation to bypass, but can&#039;t because of some bug on W2K servers. Anyone have suggestions? Here&#039;s the function code I&#039;m using.<BR><BR>Private Function BrowseDirectory(ByVal strDirectoryPath As String, ByVal strSearch As String) As String<BR> &#039;Expects: Directory Path to browser. String to search files.<BR> &#039;Returns: Full Path and filename to be moved.<BR><BR> Dim dir As New System.IO.DirectoryInfo(strDirectoryPath)<BR> Dim f As System.IO.FileInfo<BR> Dim strMySearch As String<BR> Dim strFileName As String<BR> strMySearch = "*" & strSearch & "*"<BR><BR> For Each f In dir.GetFiles(strMySearch)<BR> strFileName = f.FullName<BR> Exit For<BR> Next f<BR><BR> If Len(strFileName) = 0 Then<BR> BrowseDirectory = "NONE"<BR> Else<BR> BrowseDirectory = strFileName<BR> End If<BR><BR> End Function

  2. #2
    Join Date
    Dec 1969

    Default RE: Accessing directories on a remote server

    Are you allowing "Write" capability (for the anonymous user) on the folder or files which you are trying to access via the anonymous user? If not, I would look in that direction. This is all I can think of which might cause the problem short of the file/folder not allowing the ASPNET user to view it. Check also to see if the ASPNET user has permissions on the file/folder you are trying to access....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts