Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: WinInet error 12003 with wwFTP.FTPsendfile()

$
0
0
Re: WinInet error 12003 with wwFTP.FTPsendfile()
West Wind Internet Protocols
Re: WinInet error 12003 with wwFTP.FTPsendfile()
Dec. 22, 2012
03:53 am
3O908CLFLShow this entire thread in new window
Gratar Image based on email address
From:Frits van den Munckhof
To:Rick Strahl
Hi Rick,

(I will fully understand if you have other priorities than answering these questions)

From your last reply I learned that there is a cErrorMsg property as well for the wwFTP-object, which I used "stand-alone" and for the first time ever. I just checked your normally very thorough documentation and since the cErrorMsg wasn't mentioned there I thought the only available error-message was the resultcode. I should have inspected the ftp-object. Sorry. I feel a bit clumsy.

The message is as follows (as you suspected):

200 Typesetto I. 200 PORT command successful. 550 /gehamie.html: Access is denied.

I know you will think: OK, get the Access! But the problem is that I already have the access, since I can upload through the Windows Explorer. However, I tested and found out that I don't have delete rights. Could it be that your FTPsendfile()-method first sends a delete instruction? Because in that case I think we can consider this as "case closed", because then I wil have to get delete rights (won't be easy, since I could do harmful things with those rights).

"Yep, FTPsendfile() starts with a delete" would be a perfect -quick- response from you :-)!

Anyway, thanks a lot for your patience.

FYI:
In a next project I will start using your latest ideas about .NET interoperatability. It looks very well documented, so I hope I will solve any upcoming questions myself.

Perhaps good for you to know that some sites based on WebConnection are still up and running after more than 12 years of excellent service and almost no maintenance cost.

And partly thanks to your inspiring articles and products I've also been able to extend the life of an extended ERP-system I wrote, by adding all kind of automated interactions with the "company environment". Although based on VFP and in use for more than 15 years, this ERP-system still feels very "up-to-date" to its users (among which the Dutch market leader in trailers).

loHttp.cErrorMsg will hopefully hold more information. 12003 is an FTP error and the error message should forward the message from the server.

Most likely it's an invalid path/server name, or permissions denied.

+++ Rick ---


Thanks again Rick for your quick response. I always wonder how you can keep up this great support.

I feel a a little "retarded", but can I get any other error message than the result code?

I'm not in a position to test at this moment. But I suspect the problem could be that I didn't start cTarget with a forward slash (though I used a FULLPATH() for the cSource).

Could that be the problem? A simple Yes or No would be great.


And the error message is?

Make sure the server names and paths are correct and trimmed too.

FtpConnect() actually doesn't connect (in the typical style of WinInet), but simply sets the connection parameters. It's not until you actually do something with the connection that the actual network operations start to happen. Rarely do you see an error on FtpConnect() unless the domain names are completely wrong/invalid.

+++ Rick ---


Sorry Rick, for not being clear enough.

This first part succeeds (resultcode 0)

LOCAL lnResult lnResult=THISFORM.Ftp.FTPconnect(ALLTRIM(THISFORM.txtFTPserver.Value),ALLTRIM(THISFORM.txtUserID.Value),ALLTRIM(THISFORM.txtPassword.Value))IF lnResult=0* Succes AppMsg("De connectie met de FTP-server '"+THISFORM.txtFTPserver.Value+"' is geslaagd","Connectie geslaagd","I") THISFORM.Ftp.FTPclose()ELSE* Connectie mislukt AppMsg("De connectie met de FTP-server '"+THISFORM.txtFTPserver.Value+"' is mislukt. WinInet Error code: "+TRIMSTR(lnResult),"Connectie mislukt","X")RETURN .F.ENDIF

This second statement fails (resultcode 12003), of course without changing the input values for the text-fields between the 2 calls.

lnResult=THISFORM.Ftp.FTPsendfile(ALLTRIM(THISFORM.txtFTPserver.Value),lcFile,JUSTFNAME(lcFile),;ALLTRIM(THISFORM.txtUserID.Value),ALLTRIM(THISFORM.txtPassword.Value))

This is not a very useful error request.

What's the code? What and when does it fail?

Check the server name and make sure the domain name is correct and trimmed.

+++ Rick ---



MSDN suggested this is because of going to a non-Microsoft ftp-server. Passive mode was adviced.

Just connecting to the server succeeds.

I've tried setting lpassiveftp to .T.. That doesn't seem to work. Same error. Any other ideas?







Viewing all articles
Browse latest Browse all 10393

Trending Articles