Accessing Remote Server using NT and Basic Authentication

Discussion in 'ASP General' started by jswidorski, Feb 18, 2005.

  1. jswidorski

    jswidorski Guest

    Hello,

    I have an Intranet web server setup using Basic and NT Authentication. I
    want to use FileSystemObject to read a directories on a different server. I
    keep getting a Path Not Found Error.

    IIS Server: METESTWEB
    Remote Server \\ABC\Directory\
    The remote server has everyone permissions on it so anyone authenticate on it.

    Am I doing something wrong? I can access it fine from my computer, others
    cannot.

    Also, is there a way to use just NT Authentication? I don't want my users
    to kave to key their user id and password.

    ASP Code:
    ========
    startFolder = "\\ABC\Directory"

    Private Sub displayFolder(ByVal folderName)
    Set fso = server.CreateObject("Scripting.FileSystemObject")
    Set rootFolder = fso.GetFolder(server.MapPath(folderName))

    For Each currentFolder In rootFolder.SubFolders
    makeLink currentFolder.Path
    For Each subFolder In currentFolder.SubFolders
    On Error Resume Next
    displayFolder subFolder.Path
    Next
    Next
    Set rootFolder = Nothing
    Set fso = Nothing
    End Sub

    Private Sub makeLink(ByVal pathName)
    strLinkName = pathName
    strLinkName = Replace(strLinkName, "\", "/")

    aryDirItem = Split(strLinkName,"/")
    strLinkName = Right(strLinkName, Len(strLinkName)-7)
    Response.Write "<a href='documents.asp?docFolder=" & pathname &"'>" &
    aryDirItem(ubound(aryDirItem)) & "</a><BR>"
    End Sub

    HTML Code Snippet:
    =============
    <TD width=300 valign=top><% displayFolder startFolder %></TD>
    jswidorski, Feb 18, 2005
    #1
    1. Advertising

  2. jswidorski

    Mark Schupp Guest

    see http://www.aspfaq.com/show.asp?id=2168

    --
    --Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com

    "jswidorski" <> wrote in message
    news:...
    > Hello,
    >
    > I have an Intranet web server setup using Basic and NT Authentication. I
    > want to use FileSystemObject to read a directories on a different server.
    > I
    > keep getting a Path Not Found Error.
    >
    > IIS Server: METESTWEB
    > Remote Server \\ABC\Directory\
    > The remote server has everyone permissions on it so anyone authenticate on
    > it.
    >
    > Am I doing something wrong? I can access it fine from my computer, others
    > cannot.
    >
    > Also, is there a way to use just NT Authentication? I don't want my users
    > to kave to key their user id and password.
    >
    > ASP Code:
    > ========
    > startFolder = "\\ABC\Directory"
    >
    > Private Sub displayFolder(ByVal folderName)
    > Set fso = server.CreateObject("Scripting.FileSystemObject")
    > Set rootFolder = fso.GetFolder(server.MapPath(folderName))
    >
    > For Each currentFolder In rootFolder.SubFolders
    > makeLink currentFolder.Path
    > For Each subFolder In currentFolder.SubFolders
    > On Error Resume Next
    > displayFolder subFolder.Path
    > Next
    > Next
    > Set rootFolder = Nothing
    > Set fso = Nothing
    > End Sub
    >
    > Private Sub makeLink(ByVal pathName)
    > strLinkName = pathName
    > strLinkName = Replace(strLinkName, "\", "/")
    >
    > aryDirItem = Split(strLinkName,"/")
    > strLinkName = Right(strLinkName, Len(strLinkName)-7)
    > Response.Write "<a href='documents.asp?docFolder=" & pathname &"'>" &
    > aryDirItem(ubound(aryDirItem)) & "</a><BR>"
    > End Sub
    >
    > HTML Code Snippet:
    > =============
    > <TD width=300 valign=top><% displayFolder startFolder %></TD>
    >
    Mark Schupp, Feb 18, 2005
    #2
    1. Advertising

  3. jswidorski

    jswidorski Guest

    Would you happen to have a book recommendation on this topic? As detailed as
    this faq may be, I find it IMPOSSIBLE to find an answer.

    I would think that using NT Authentication, one would just have to connect
    to the UNC and be good to go. Authority should play no part as the user has
    been validated and the path found.

    As permissions go on the UNC. Everyone has authority to atleast read the
    directory.

    Thanks,...John Swidorski


    "Mark Schupp" wrote:

    > see http://www.aspfaq.com/show.asp?id=2168
    >
    > --
    > --Mark Schupp
    > Head of Development
    > Integrity eLearning
    > www.ielearning.com
    >
    > "jswidorski" <> wrote in message
    > news:...
    > > Hello,
    > >
    > > I have an Intranet web server setup using Basic and NT Authentication. I
    > > want to use FileSystemObject to read a directories on a different server.
    > > I
    > > keep getting a Path Not Found Error.
    > >
    > > IIS Server: METESTWEB
    > > Remote Server \\ABC\Directory\
    > > The remote server has everyone permissions on it so anyone authenticate on
    > > it.
    > >
    > > Am I doing something wrong? I can access it fine from my computer, others
    > > cannot.
    > >
    > > Also, is there a way to use just NT Authentication? I don't want my users
    > > to kave to key their user id and password.
    > >
    > > ASP Code:
    > > ========
    > > startFolder = "\\ABC\Directory"
    > >
    > > Private Sub displayFolder(ByVal folderName)
    > > Set fso = server.CreateObject("Scripting.FileSystemObject")
    > > Set rootFolder = fso.GetFolder(server.MapPath(folderName))
    > >
    > > For Each currentFolder In rootFolder.SubFolders
    > > makeLink currentFolder.Path
    > > For Each subFolder In currentFolder.SubFolders
    > > On Error Resume Next
    > > displayFolder subFolder.Path
    > > Next
    > > Next
    > > Set rootFolder = Nothing
    > > Set fso = Nothing
    > > End Sub
    > >
    > > Private Sub makeLink(ByVal pathName)
    > > strLinkName = pathName
    > > strLinkName = Replace(strLinkName, "\", "/")
    > >
    > > aryDirItem = Split(strLinkName,"/")
    > > strLinkName = Right(strLinkName, Len(strLinkName)-7)
    > > Response.Write "<a href='documents.asp?docFolder=" & pathname &"'>" &
    > > aryDirItem(ubound(aryDirItem)) & "</a><BR>"
    > > End Sub
    > >
    > > HTML Code Snippet:
    > > =============
    > > <TD width=300 valign=top><% displayFolder startFolder %></TD>
    > >

    >
    >
    >
    jswidorski, Feb 18, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brett Porter
    Replies:
    2
    Views:
    739
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  2. Mark
    Replies:
    0
    Views:
    665
  3. Replies:
    0
    Views:
    589
  4. eRic
    Replies:
    6
    Views:
    344
    Kunal
    Mar 5, 2004
  5. Dominick Baier [DevelopMentor]

    401 Unauthorized when accessing basic Authentication site through

    Dominick Baier [DevelopMentor], Apr 3, 2006, in forum: ASP .Net Security
    Replies:
    2
    Views:
    208
Loading...

Share This Page