CIW_George
asked on
How to FTP through Dynamic DNS Service (DynDNS) using VB .NET 3.5?
I am successfully using FtpWebRequest to transfer files between the local computer and my web site (hosted off-site).
ftpReq = FtpWebRequest.Create(str_U RL)
ftpReq.KeepAlive = False
ftpReq.Credentials = New NetworkCredential(p_str_Us er_ID, p_str_Password)
ftpReq.Method = WebRequestMethods.Ftp.ListDirectory
ftpReq.Proxy = Nothing
ftpReq.UsePassive = False
ftpReq.Timeout = p_int_Timeout
Dim sr As New StreamReader(ftpReq.GetRes ponse().Ge tResponseS tream())
I can remotely access the office server (a DNS-323) using the connection string "ftp://<userID>:<password>@<ipAd dress>:<po rt>/". The office is served via Verizon FIOS and gets a dynamic DNS assigned at the whim of Verizon.
I would like to accomplish the same thing through DynDNS remote access. I can successfully do this through IE9 using the connection string "ftp://<myHostName>.dnsalias.com :<port>/".
HOWEVER, when I try this using FtpWebRequest, I get the message "The data connection was made from an address that is different than the address to which the ftp connection was made".
How do I need to tweak FtpWebRequest to make this work?
Thank you in advance for your help!
George
ftpReq = FtpWebRequest.Create(str_U
ftpReq.KeepAlive = False
ftpReq.Credentials = New NetworkCredential(p_str_Us
ftpReq.Method = WebRequestMethods.Ftp.ListDirectory
ftpReq.Proxy = Nothing
ftpReq.UsePassive = False
ftpReq.Timeout = p_int_Timeout
Dim sr As New StreamReader(ftpReq.GetRes
I can remotely access the office server (a DNS-323) using the connection string "ftp://<userID>:<password>@<ipAd
I would like to accomplish the same thing through DynDNS remote access. I can successfully do this through IE9 using the connection string "ftp://<myHostName>.dnsalias.com
HOWEVER, when I try this using FtpWebRequest, I get the message "The data connection was made from an address that is different than the address to which the ftp connection was made".
How do I need to tweak FtpWebRequest to make this work?
Thank you in advance for your help!
George
ASKER
Ok...
You're referring to NETFX 4.0 in the future tense, even though the ISO image has a release date of 5/19/2010 (almost two years ago).
Does that mean that this "problem" has not been "fixed" yet? I've seen a number of posts indicating that this problem may still exist in 4.0, but I'm not sure about the credibility of those reporting this.
I would hate to have my clients be forced to install NETFX 4.0 (assuming the problem has been fixed) just to support the FtpWebRequest and ignore the IP address from the PASV response string.
Is there an "Option 3.5 Solution" floating around that is compatible with .NET 3.5?
Or am I missing something here?
Thank you.
George
You're referring to NETFX 4.0 in the future tense, even though the ISO image has a release date of 5/19/2010 (almost two years ago).
Does that mean that this "problem" has not been "fixed" yet? I've seen a number of posts indicating that this problem may still exist in 4.0, but I'm not sure about the credibility of those reporting this.
I would hate to have my clients be forced to install NETFX 4.0 (assuming the problem has been fixed) just to support the FtpWebRequest and ignore the IP address from the PASV response string.
Is there an "Option 3.5 Solution" floating around that is compatible with .NET 3.5?
Or am I missing something here?
Thank you.
George
Try it and see if it has been fixed. There is conflicting claims, one being that it will not be fixed due to security concerns. We decided not to support this scenario for security reasons (transparently connecting to a host other than the one specified by the application). (2005 response), the other saying that it will be fixed (2009)
ASKER
I suppose I could install VS 2010, which I did purchase a while ago but I've been quite happy with VS 2008.
And then I could install NETFX 4.0, which I just downloaded.
Other than being the only means to support NETFX 4.0, which may or may not address the FtpWebRequest issue, I have no real motivation to install VS 2010 at this time.
Maybe after the weekend, somebody will step forward and say "yup, it's working great in NETFX 4.0", or "nope, still the same old problems as in 3.5."
That's kinda' the answer I'm looking for. Or a 3.5 solution.
George
And then I could install NETFX 4.0, which I just downloaded.
Other than being the only means to support NETFX 4.0, which may or may not address the FtpWebRequest issue, I have no real motivation to install VS 2010 at this time.
Maybe after the weekend, somebody will step forward and say "yup, it's working great in NETFX 4.0", or "nope, still the same old problems as in 3.5."
That's kinda' the answer I'm looking for. Or a 3.5 solution.
George
ASKER
The following was posted by an individual about six weeks (7/1/2009) after the the quote you provided from the Microsoft Network Class Library Team (5/21/2009):
"I have downloaded NETFX 4.0 and Visual Studio 2010 Beta version to try out if the fix has been implemented. The exception is still being thrown."
And another post on Microsoft Connect on 4/19/2011:
"So no fix and no workaround. Hopeless."
Still looking for information less than a year old...
"I have downloaded NETFX 4.0 and Visual Studio 2010 Beta version to try out if the fix has been implemented. The exception is still being thrown."
And another post on Microsoft Connect on 4/19/2011:
"So no fix and no workaround. Hopeless."
Still looking for information less than a year old...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'd have working over elegant any day!
ASKER
The answers provded by others were simply Microsoft "promises" - no solution was provided.
My solution is probably not the most glamorous, and maybe not the best solution, but it answers the original question.
My solution is probably not the most glamorous, and maybe not the best solution, but it answers the original question.
http://connect.microsoft.com/VisualStudio/feedback/details/97409/ftpwebre