Running on a 2003 web server with IIs 6.A desktop application brings back the correct folder.count value as well as the item data from the directory.
The same code running under IIs brings back a folder count of zero. The log shows the same byte count retrieved as the desktop app but the data is not available.
Has anyone seen this behavior?
Following is the ASp code used.
<%
'on error resume next
Dim m_SessionLogs
dim Datafield
m_SessionLogs = "*****************************" & "<br>"
m_SessionLogs = m_SessionLogs & "Start Directory List" & "<br>"
Dim pApi
Dim pConn
Dim pFolder
Dim pLocFolder
Dim pItem
Dim wkConnStr
m_ServerDir = "/Telecdat/Vics"
wkConnStr = "ftp://ABC123:ABC123@158.100.100.108"
Set pApi = CreateObject("WsftpSDK.WsftpApi.1") 'create object name
Set pConn = pApi.CreateUrlConnection(wkConnStr) 'Use the URL text field in this example
If pConn Is Nothing Then 'If a connection error encountered
m_SessionLogs = "Connection error: " & pApi.LastError() & " " & pApi.GetErrorString(pApi.LastError()) & "<br>"
End If
m_SessionLogs = m_SessionLogs & "Connected." & "<br>"
Set pFolder = pConn.GetFolder("*", m_ServerDir)
If pFolder Is Nothing Then
m_SessionLogs = "Change Directory to " & m_ServerDir & " failed. " & pConn.LastServerResponse & "<br>"
End If
m_SessionLogs = m_SessionLogs & "Change directory to " & m_ServerDir & " succeeded." & "<br>"
m_SessionLogs = m_SessionLogs & "Folder = " & m_ServerDir & "<br>"
m_SessionLogs = m_SessionLogs & "pFolder.Count= " & pFolder.Count & " *********<br>"
Datafield = Datafield & "<br><br><br><br><br>Session logs:<br>"
Datafield = Datafield & m_SessionLogs
%>
<HTML>
<HEAD>
</HEAD>
<body>
<%= Datafield %>
</body>
</HTML>