Is it possible to programmatically manage the state of an FTP server in IIS7?

I can manage FTP sites through IIS Manager, however, all attempts so far to monitor the status of FTP sites using other tools have failed, including:

Related questions:

Are there any workarounds that I have not tried? My goal is to manage (start / stop / request status) FTP sites with C # code (as you can see from the three bypass attempts described above).

When querying the status of an FTP server using WMI, it returns a code of 4, which means “Stopped,” although the site definitely displays as running in IIS Manager.

AppCmd ​​is useless since it returns "Unknown" for FTP sites:

c:\Windows\System32\inetsrv>appcmd list site
SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Stopped)
SITE "Default FTP Site" (id:2,bindings:ftp/*:21:,state:Unknown)
+3
source share
2 answers

My workaround for managing state is to set ServerAutoStart to false and restart the ftpsvc Windows service. So far, I have not found a way to detect the status of a specific FTP server (IIS may have several FTP servers with different bindings).

-1
source

To determine the status, you can simply make a connection attempt.

, , WMI.

-2

Source: https://habr.com/ru/post/1749208/


All Articles