Reputation: 8461
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.
Upvotes: 5
Views: 14712
Reputation: 2201
In my case, after I checked the log file, it suggested that the deployment kept timing out. I restarted my computer and that error message is gone.
Upvotes: 0
Reputation: 5719
It should work after 5 simple steps (IIS7.5):
Upvotes: 0
Reputation: 19347
You can also do this (I was getting the same error as yours):
1 - Build > Publish 'project'
.
2 - Uncheck the Passive Mode
.
Upvotes: 4
Reputation: 727
If you have acces to the server. You have to add the svchost.exe to the "Allowed Programs" in Windows Firewall.
Look at this film. Its at the end. youtube film
This worked for me.
Upvotes: -1
Reputation: 6265
Open your publish profile Properties\PublishProfiles\your_profile_name.pubxml
Add <FtpPassiveMode>False</FtpPassiveMode>
to <PropertyGroup>
Save file and publish again.
Upvotes: 13
Reputation: 8461
As a workaround, publish the site to a filesystem (ie, save it locally), and then use another FTP client to transfer it. It's not great at all, but, if you're desperate and out of options then it may be a solution, however temporary.
As an actual fix, it's down to the server to enable this. In my case, it turned out to be a firewall problem (gave incoming permissions to FileZilla Server) and not using a custom port range in FileZilla server (under passive)! This suggests it was a port issue!
However, this doesn't explain why you can or can't turn off/on passive mode in VS 2012 but could in earlier releases.
Upvotes: 4