FTP SDK Directory List under IIS

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



FTP SDK Directory List under IISExpand / Collapse
Author
Message
Posted 2/19/2008 2:56:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/20/2008 7:33:46 AM
Posts: 3, Visits: 4
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>

  Post Attachments 
ProdScreenShot.jpg (0 views, 108.25 KB)

Post #41089
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Hush, FTPplanet.com, Hugh Garber, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 7:52am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 9 queries. Compression Enabled.