Hi,
While creating a socket, I have specified that it be connected to the localhost(Windows 2008 R2 64 bit machine) since my SFTP server is running there. It started throwing exceptions that socket could not be created.
After successfully connecting using the same code from a different machine(32bit Windows 7), I understood that the issue is just in this machine. I have put breakpoints in the code and finally got to this...
__File__ : Renci.SshNet\Common\Extensions.NET.cs.
__Method__ : internal static IPAddress GetIPAddress(this string host)
This method is taking the first address and on some machines, the IPV6 address is first. With this, it is not able to create a socket and hence it is failing.
Since I am using the code (and not just binaries), I can go ahead change the code to check the AddressFamily.InterNetwork and return the IPv4 address. But, should this be considered as a change which will be incorporated by someone who is contributing? Or, is my thought process wrong on this?
While creating a socket, I have specified that it be connected to the localhost(Windows 2008 R2 64 bit machine) since my SFTP server is running there. It started throwing exceptions that socket could not be created.
After successfully connecting using the same code from a different machine(32bit Windows 7), I understood that the issue is just in this machine. I have put breakpoints in the code and finally got to this...
__File__ : Renci.SshNet\Common\Extensions.NET.cs.
__Method__ : internal static IPAddress GetIPAddress(this string host)
This method is taking the first address and on some machines, the IPV6 address is first. With this, it is not able to create a socket and hence it is failing.
Since I am using the code (and not just binaries), I can go ahead change the code to check the AddressFamily.InterNetwork and return the IPv4 address. But, should this be considered as a change which will be incorporated by someone who is contributing? Or, is my thought process wrong on this?