| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: FTP DNS resolution fails |
| msisson msisson@firstam.com From: poway, CA USA Posts: 22 Member Since: 09/24/03 |
posted October 17, 2003 1:07 PM Yet another problem with your FTP component!!!! This is getting pretty frustrating!!!! The code below works when using the IP but not with the DNS name. To make sure that I don't have any DNS problems I opened up my WS_FTP utility program and used ftp.credit411.com instead of the IP address 64.220.154.76 and it works fine. Also in DOS I can invoke command line FTP with the DNS name just fine. Why??? Here's the exception that is throw: ----------------------------------------- A first chance exception of type 'System.FormatException' occurred in system.dll Additional information: An invalid IP address was specified. C# Sample --------------------------------------- Dart.PowerTCP.Ftp.Ftp ftp = new Dart.PowerTCP.Ftp.Ftp(); Dart.PowerTCP.Ftp.Listing list; ftp.Server = @"64.220.154.76"; //ftp.Server = @"ftp.credit411.com"; <--CAUSES FAILURE! ftp.Username = "xxx"; ftp.Password = "xxx"; ftp.ServerPort = 21; ftp.DoEvents = false; ftp.Passive = false; ftp.Restart = false; ftp.Timeout = 30000; list = ftp.List(@"outbound/*.man", true); <-EXCEPTION HAPPENS HERE |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 17, 2003 1:23 PM You probably have more than network interface on your system and we are choosing one that doesn't have the same DNS properties as the on that the other programs use. Try setting Ftp1.Client to the value of each IP address that is assigned to your machine and see if one of them works. Also, please note that if you post a message here, there is no need to send a duplicate to support@dart.com. Either method of contacting us is fine, but there is reason to use both. |
| msisson msisson@firstam.com From: poway, CA USA Posts: 22 Member Since: 09/24/03 |
posted October 17, 2003 2:41 PM There's only one NIC card in this machine so it's not multi-homed. Below is a dump from ipconfig. I modify my code below to set the client property of your component. No luck. For another test I also tried using XCeed's ActiveX component (this is your competitor) in a VB app and it worked too. That sample code is provided below as well. <Massive amounts of unnecessary code deleted by admin> |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 17, 2003 2:59 PM I noticed that the exception thrown is a first chance exception. How are you catching it? It almost seems like its the exception that's thrown inside our control that tells us to resolve the name since we could not make an IP out of the string you passed in. |
| msisson msisson@firstam.com From: poway, CA USA Posts: 22 Member Since: 09/24/03 |
posted October 17, 2003 3:54 PM Problem Solved! I was stepping through the debugger in VS.NET and it was picking up your properietary exceptions. I was getting thrown off by the description of the error message and didn't realize that this could be an internal exception that you throw, and more importantly, catch within your own logic. I removed my debugging condition to not break on exceptions from CLR and everything worked great. Thanks for you help, I hope this post saves other people some time as well. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|