﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Ipswitch Forums / File Transfer / WS_FTP Professional Software Development Kit  / FTP SDK Directory List under IIS / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Ipswitch Forums</description><link>http://forums.ipswitch.com/</link><webMaster>forums@ipswitch.com</webMaster><lastBuildDate>Fri, 09 Jan 2009 21:39:00 GMT</lastBuildDate><ttl>20</ttl><item><title>FTP SDK Directory List under IIS</title><link>http://forums.ipswitch.com/Topic41089-9-1.aspx</link><description>Running on a 2003 web server with IIs 6.&lt;/P&gt;&lt;P&gt;A desktop application brings back the correct folder.count value as well as the item data from the directory.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Has anyone seen this behavior?&lt;/P&gt;&lt;P&gt;Following is the ASp code used.&lt;/P&gt;&lt;P&gt;&amp;lt;%&lt;/P&gt;&lt;P&gt;'on error resume next&lt;BR&gt;Dim m_SessionLogs&lt;BR&gt;dim Datafield&lt;/P&gt;&lt;P&gt;    m_SessionLogs = "*****************************" &amp;amp; "&amp;lt;br&amp;gt;"&lt;BR&gt;    m_SessionLogs = m_SessionLogs &amp;amp; "Start Directory List" &amp;amp; "&amp;lt;br&amp;gt;"&lt;/P&gt;&lt;P&gt;Dim pApi&lt;BR&gt;Dim pConn &lt;BR&gt;Dim pFolder &lt;BR&gt;Dim pLocFolder  &lt;BR&gt;Dim pItem &lt;/P&gt;&lt;P&gt;Dim wkConnStr&lt;BR&gt;m_ServerDir = "/Telecdat/Vics"&lt;/P&gt;&lt;P&gt;wkConnStr = "&lt;A href="ftp://ABC123:ABC123@158.100.100.108"&gt;ftp://ABC123:ABC123@158.100.100.108&lt;/A&gt;"       &lt;/P&gt;&lt;P&gt;        Set pApi = CreateObject("WsftpSDK.WsftpApi.1")                                  'create object name&lt;/P&gt;&lt;P&gt;        Set pConn = pApi.CreateUrlConnection(wkConnStr) 'Use the URL text field in this example&lt;BR&gt;        If pConn Is Nothing Then      'If a connection error encountered&lt;BR&gt;            m_SessionLogs = "Connection error: " &amp;amp; pApi.LastError() &amp;amp; " " &amp;amp; pApi.GetErrorString(pApi.LastError()) &amp;amp; "&amp;lt;br&amp;gt;"&lt;BR&gt;         End If&lt;/P&gt;&lt;P&gt;        m_SessionLogs = m_SessionLogs &amp;amp; "Connected." &amp;amp; "&amp;lt;br&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;BR&gt;    Set pFolder = pConn.GetFolder("*", m_ServerDir)&lt;BR&gt;    If pFolder Is Nothing Then&lt;BR&gt;        m_SessionLogs = "Change Directory to " &amp;amp; m_ServerDir &amp;amp; " failed. " &amp;amp; pConn.LastServerResponse &amp;amp; "&amp;lt;br&amp;gt;"&lt;BR&gt;    End If&lt;BR&gt;    m_SessionLogs = m_SessionLogs &amp;amp; "Change directory to " &amp;amp; m_ServerDir &amp;amp; " succeeded." &amp;amp; "&amp;lt;br&amp;gt;"&lt;/P&gt;&lt;P&gt;m_SessionLogs = m_SessionLogs &amp;amp; "Folder = " &amp;amp; m_ServerDir &amp;amp; "&amp;lt;br&amp;gt;"&lt;BR&gt;m_SessionLogs = m_SessionLogs &amp;amp; "pFolder.Count= " &amp;amp; pFolder.Count &amp;amp; " *********&amp;lt;br&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;BR&gt;Datafield = Datafield &amp;amp; "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Session logs:&amp;lt;br&amp;gt;"&lt;BR&gt;Datafield = Datafield &amp;amp; m_SessionLogs&lt;/P&gt;&lt;P&gt;%&amp;gt;&lt;BR&gt;&amp;lt;HTML&amp;gt;&lt;BR&gt;  &amp;lt;HEAD&amp;gt;&lt;BR&gt;&amp;lt;/HEAD&amp;gt;&lt;BR&gt;&amp;lt;body&amp;gt;&lt;BR&gt;&amp;lt;%= Datafield %&amp;gt;&lt;BR&gt;&amp;lt;/body&amp;gt;&lt;BR&gt;&amp;lt;/HTML&amp;gt;</description><pubDate>Tue, 19 Feb 2008 14:56:56 GMT</pubDate><dc:creator>vasimo</dc:creator></item></channel></rss>