| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: SocketException (0x2afc): The required name is valid, but no necessary data ... |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 20, 2008 5:40 AM SocketException (0x2afc): The required name is valid, but no necessary data of the type was found Hello, I’m using Dart.PowerTCP.Ftp with Visual Studio 2003 C# for build a Web application. ControleFTP.Server = ServeurFTP.Adresse; ControleFTP.Username = ServeurFTP.Login ; ControleFTP.Password = ServeurFTP.MotDePasse ; string Path = ControleFTP.GetDirectory() ; // Exception at this Line Result : [SocketException (0x2afc): Le nom demandé est valide, mais aucune donnée du type requise n’a été trouvée] Dart.PowerTCP.Ftp.ai.Invoke(Delegate A_0, Object[] A_1) Dart.PowerTCP.Ftp.Ftp.Invoke(FtpCommand command, String modifier) Dart.PowerTCP.Ftp.Ftp.Invoke(FtpCommand command) Dart.PowerTCP.Ftp.Ftp.GetDirectory() FTP.FrontOffice._default.ConnectionFTP() FTP.FrontOffice._default.Page_Load(Object sender, EventArgs e) System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain() Have you a idea of the reason of this problem? Thanks Nicolas |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 20, 2008 12:36 PM Hostname was Bad (Starting with "ftp://") Now error is : [SocketException (0x2751): A socket operation was attempted to an unreachable host.] Dart.PowerTCP.Ftp.ai.Invoke(Delegate A_0, Object[] A_1) Dart.PowerTCP.Ftp.Ftp.List(String searchPattern, Boolean full) FTP.FrontOffice._default.ConnectionFTP() in \\alan-mathison\wwwroot$\ftp\frontoffice\default.aspx.cs:149 FTP.FrontOffice._default.Page_Load(Object sender, EventArgs e) in \\alan-mathison\wwwroot$\ftp\frontoffice\default.aspx.cs:59 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain() I have the same error with WebForm CSharp Sample but no with WinForm CSharp Sample. Any Idea ? Nicolas |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted May 20, 2008 2:33 PM The first error occurs when a host name can't be resolved by a DNS server. The second error occurs when no path to connect with the server can be determined. Are you able to connect to any public FTP servers with your project? |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 21, 2008 2:52 AM "Are you able to connect to any public FTP servers with your project?" No, I can't. Same problem with the Dart WebForm Sample. But it's working with WinForm Sample. |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 22, 2008 4:49 AM There is something to change to allow the Web server the use of the ftp ? |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted May 22, 2008 9:55 AM I haven't been able to duplicate the issue, could you try replacing the line "string Path = ControleFTP.GetDirectory()" with the following: ControleFTP.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null,"PWD"); If you do not get the error any longer then it's probably an issue with the data connection and you can try setting the Passive property to false. |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 23, 2008 2:50 AM ControleFTP.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null,"PWD"); ControleFTP.Invoke(FtpCommand.NoOp); ControleFTP.GetDirectory() ; Dart.PowerTCP.Ftp.Listing Liste = ControleFTP.List("*",false) ; Give the same error, perhaps it's a security problem on webserver |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted May 23, 2008 11:16 AM That is what the original errors lead me to believe, It could be a trust issue but usually in those cases the assembly will just fail to load. But it is probably some issue with the web server, unfortunately I can't tell you what. Have you tried connecting with the IP address of the FTP server instead of the URL? |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 23, 2008 11:45 AM Yes, I've tried but result it's the same. |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 28, 2008 11:01 AM I think is a security problem so I decide to use a Proxy Server : ControleFTP.Server = ServeurFTP.Adresse; ControleFTP.Username = ServeurFTP.Login ; ControleFTP.Password = ServeurFTP.MotDePasse ; ControleFTP.Passive = true ; ControleFTP.UseControlAddressForPassive = true; ControleFTP.Timeout =10000; ControleFTP.Proxy.Server = "10.***.***.***"; ControleFTP.Proxy.ServerPort = 8080; ControleFTP.Proxy.Type = Dart.PowerTCP.Ftp.FtpProxyType.HttpConnect; ControleFTP.Proxy.Username = "Username"; ControleFTP.Proxy.Password = "Password"; string Path = ControleFTP.GetDirectory() ; But result is always bad: A 200 response was expected from the proxy Port SSL (Secure Sockets Layer) specified is not authorized I don’t want use SSL, how to make? |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted May 28, 2008 12:28 PM Instead of connecting on port 8080 of the proxy server can you try port 443. You are getting this error because to connect over an http proxy you need to be using https. |
| Nikolian2 From: Lisses, France Posts: 9 Member Since: 05/20/08 |
posted May 28, 2008 12:35 PM I tested with direct internet connection (without ISA Server) Without proxy result is good. It’ thus a problem of right between account Internet and my account. Can I assign my identity to your object? (With a NetworkCredential or other) |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted May 28, 2008 1:36 PM Our control does not support the ICredentials Interface so you can't use the NetworkCredential object with it. The technique your looking for is Impersonation. Unfortunately this an involved process and we can not directly provide support for it. The following link should give you a good start point in explaining the steps necessary to implement this technique. http://msdn.microsoft.com/en-us/library/b80a7e92.aspx |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|