I can not publish my website via FTP - No option to turn on passive mode

Dave picture Dave · Mar 19, 2013 · Viewed 12.9k times · Source

Historically I've always uploaded my website via FTP since my server does not have front page extensions and nor will it.

Using the latest release of Visual Studio 2012 (11.0.51106.01 Update 1) (although I think this issue is for all of 2012), I cannot publish my website!

The error message is

2>Unable to add 'file' to the Web site. FTP Passive mode is not available

I will also point out that my connection validates so I don't think the error message is anything but clear and meaningful!

So, I have 3 questions.

  1. Is this something I'm doing wrong or a fault with Visual Studio 2012?
  2. Should I be trying to do this via passive mode or should I be updating my web server to enable "active mode"?
  3. Is FTP still an acceptable method or should I be investigating the Web Deploy option?

Answer

Anri picture Anri · Apr 18, 2013
  1. Open your publish profile Properties\PublishProfiles\your_profile_name.pubxml

  2. Add <FtpPassiveMode>False</FtpPassiveMode> to <PropertyGroup>

  3. Save file and publish again.