Recently one of the reader asked an interesting question, he was using FtpWebRequest with MakeDirectory method, if directory already exist then application received the WebException with message.
In such case if FtpWebRequest user want to diagnose and figure out why request actually failed, he could access the actual response message from server using
try{ . . . . . . . . WebResponse response = request.GetResponse(); . . . . . . . . . .}catch(WebException e){ String status = ((FtpWebResponse)e.Response).StatusDescription;}
This posting is provided "AS IS" with no warranties, and confers no rights