Azure devops pipelines, inspect ftp traffic during release

Is there a way to log detailed ftp traffic from microsoft hosted agent? In my case, when running ui tests in release pipeline, screenshoots are uploaded to ftp server. It worked fine for few weeks unitl yesterday when I started getting following errors:

enter image description here

There was no change on the ftp server side and in c# code used for uploading ftp files. Uploading files still works fine when i run tests locally and this issue happens only when they are run from pipeline, so I thought about comparing network traffic, looking for some clues.

1 answer

  • answered 2020-11-24 02:29 Kevin Lu-MSFT

    Is there a way to log detailed ftp traffic from microsoft hosted agent?

    You could try to use the network tracing to collect the Ftp traffic log.

    You could add the configuration in the config file (e.g. web.config , app.config).

    For example: To collect the FTPWebRequest and FtpWebResponse information, you could use

          <source name="System.Net" tracemode="protocolonly" maxdatasize="1024">
              <add name="System.Net"/>
          <add name="System.Net" value="Information"/>
          <add name="System.Net"
        <trace autoflush="true"/>

    Then it will create a network.log file.

    Since you are using the Microsoft-Hosted agent, you could determine the file location and use the Publish Build Artifacts task to upload the file as build artifacts.