Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Remote Server using NT and Basic Authentication

Status
Not open for further replies.

jswidorski

Programmer
Aug 25, 2003
8
US
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 have 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>
 
As far as the NT Auth goes, you would have to have everyone set up with Somain accounts and then give domain users rights as a group. Might work the same with Workgroups, I haven't dug to far into that side of this stuff :)

One possible solution would be to map a drive to the target directory. that should overcome any remote auth problems your running into. It definately seems odd that you can access the remote folder from your machine but no one else can, if teer is any place to start looking that would be it. Unfortunatly I don't have enough windows machines around here right now to play with this and give you a better direction, perhaps someone else will have a good suggestion.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top