Is it actually possible to programmatically manage the state of an FTP server in IIS7?
Posted
by nbolton
on Stack Overflow
See other posts from Stack Overflow
or by nbolton
Published on 2010-06-09T13:35:35Z
Indexed on
2010/06/09
13:42 UTC
Read the original article
Hit count: 471
I'm able to manage FTP sites via the IIS manager, however, all attempts so far to manage the state of FTP sites using other means have failed, including:
- Using the IIS7 API (Microsoft.Web.Administration)
- Using WMI (with IIS6 compatibility enabled)
- Using the AppCmd tool in System32\inetsrv
Related questions:
Are there any workarounds I haven't tried? My objective is to manage (start/stop/query the state of) the FTP sites with C# code (as you can see from the 3 above attempted workarounds).
When querying the FTP server state using WMI, it returns code 4, which means "Stopped", even though the site is definitely shown as running in IIS manager.
AppCmd is useless, as 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)
© Stack Overflow or respective owner