Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Unable to use VS 2008 ClickOnce Publish to FTP.
 

Unable to use VS 2008 ClickOnce Publish to FTP.

So I'm trying to use the click once publishing tool in VS2008 but it keeps failing to copying the files. I'm using the ftp site option using the settings

Server: ftp.myDomain.com
Port: 21
Directory: myDomain.com/MyApplication

Passive mode: No
Anonymous Login: No

When I publish I get the FTP Log On dialog again, where I uncheck the connect using passive mode box and again enter my username and password.

After this the clickOnce is stalling with the message "Publishing files..." and after a while (2-3 minutes) it reports back the following:

Error1Failed to copy file 'C:\Documents and Settings\....\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\app.publish\WindowsFormsApplication1.application' to 'ftp://ftp.myDomain.com/myDomain.com/MyApplication/Application Files/WindowsFormsApplication1_1_0_0_1/WindowsFormsApplication1.application'. Unable to add 'Application Files/WindowsFormsApplication1_1_0_0_1/WindowsFormsApplication1.application' to the Web site. Could not find a Web server at 'ftp.myDomain.com' on port 21. Please check to make sure that the Web server name is valid and your proxy settings are set correctly. If you are sure that everything is correct, the Web server may be temporarily out of service.1WindowsFormsApplication11

I get three similar errors like the one above which are all connected to the three files it tries to copy. Looking at the server I see that the directories have all been created as they should.

I have experimented with several settings, using both passive mode and not but nothing seems to work.

Trying the same thing using VS 2005 it all works fine with the same settings (not using passive mode)

Any ideas about this?
Ergodyne  Monday, September 28, 2009 9:10 AM

Okay, I have some information for you.

My contact at MSFT think it may be related to this problem:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321202

It looks like the issue was fixed for VS2010 and it should not repro if you using the VS2010 Beta1. (I know, a fat lot of good that does you).

You can always create the publish packages and then use something like (free) FileZilla to transfer them to your server; you just want to be sure to get the folder structure right.

RobinDotNet


Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev
RobinDotNet  Friday, October 02, 2009 11:01 PM

Can you check all of your clickonce settings, including the information in the Security tab, Signing tab and Publish tab, and compare the solution in VS2005 to the one in VS2008? There must be something different for it to work with VS2005 but not VS2008.

And do both solutions target the same version of the .Net Framework?

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 29, 2009 3:54 AM
I started two new projects, one in VS 2005 and one in VS 2008.

Each of them just a basic winform in C# and then I set the target in VS 2008 to be to .NET 2.0.

The signing tab has exactly the same settings. The click once manifest is signed.

In the security tab, I use enable clickonce security settings, using it asa full trust application. (this is also exactly the same in both versions).

In the publish tab, they both have the same settings, and the ftp server is set using the above settings.

Still it works fine in the 2005 version but I am not able to publish in the 2008 version.

I noticed that the default behaviour for 2008 is to not enable clickonce security settings or to sign the clickonce manifest but that doesn's seem to matter which i use.


I use Visual studio 2008 professional edition, version 9.0.30729.1 SP
Ergodyne  Tuesday, September 29, 2009 8:29 AM
Also, talking to the support group hosting my ftp server, they told me to always use active mode. This got me thinking about another thread here

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/d5eafa1a-f245-4e61-a5f9-9d25c86032a4

Where someone is talking about there may be a bug in the connection dialog:

"you reported that publishing worked OK for you. Is your FTP site able to respond to Passive-mode requests? If so, then it might not matter whether or not you checked "Connect Using Passive Mode" in VS2008. So there could be a bug in VS2008, to wit, that checkbox doesn't work, in the sense that it will always use Passive mode."

I have noticed that in VS 2008 whenever I try to publish something,the checkbox for using passive mode is always checked when the dialog opens. Unchecking it and trying to publish always fails. However, in VS2005 the checkbox is changed depending on the choice I made the last publish.
Ergodyne  Tuesday, September 29, 2009 8:43 AM

Most servers require that you use passive mode, which is probably why VS2008 defaults to that value. It doesn't mean the checkbox doesn't work, it just means it doesn't save your default, which is a behavior I have not experienced.

There haven't been any other issues with ftp'ing deployments, so I'm thinking this is not a problem with ClickOnce...

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 29, 2009 4:23 PM
OK, so here is what I have done... I have tried using my clickonce on another server where I can also use passive mode. This works fine with 2008. There is no difference if I use passive mode or not in this case. Both works fine. However, when I try the server that requires active mode it seems as if it is not working at all.

Why this is so I have noidea but my only guess is that it doesn't work very well with a server requiring active mode. Have this ever been tried? I will contact the to server administrators and ask what differences they have.
Ergodyne  Wednesday, September 30, 2009 7:25 AM
I don't know; I'll ask someone at MSFT and see if they have any idea.

RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP
RobinDotNet  Friday, October 02, 2009 8:38 AM

Okay, I have some information for you.

My contact at MSFT think it may be related to this problem:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321202

It looks like the issue was fixed for VS2010 and it should not repro if you using the VS2010 Beta1. (I know, a fat lot of good that does you).

You can always create the publish packages and then use something like (free) FileZilla to transfer them to your server; you just want to be sure to get the folder structure right.

RobinDotNet


Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev
RobinDotNet  Friday, October 02, 2009 11:01 PM
Ok, I see. I guess I just have to wait for us to get the VS2010 version then.

/E
Ergodyne  Tuesday, October 06, 2009 6:59 AM
I know, you're preaching to the choir. ;-)

RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev
RobinDotNet  Tuesday, October 06, 2009 8:41 PM

You can use google to search for other answers

Custom Search

More Threads

• Installer woes
• Click once applications sharing dlls
• how to make parent form hot keys work in user controls...
• Click doesn't install required components
• Bootstrapper and URL Parameters
• Problem in Setup and Deployment project
• publish application in VS2005 pro
• Clickonce installation stops (fails) without error message
• Auto Updates
• Framework 2 Deployment problem