Prev: populate a DataSet via a LINQ query (Linq to XML)
Next: About Application Security(Code Access Security). It dosn't show correct output
From: Konrad Neitzel on 14 Apr 2010 12:41 Hi! > I just found out that the user entered an http address rather than an ftp > address which probably caused the error. I emailed him back to enter an ftp > address and then try it. Since the client is in England I won't know until > tomorrow morning if it works. In your code you should always make sure, that the user entered something valid. If you cannot do that fully, then you should keep care of the possible errors. (In your example, it is the cast to the FTP Request.) It is always a good idea to make the application as "fool proven" as possible (e.g. giving an error message: "You did not enter a valid FTP Url." instead of an application crash!) With kind regards, Konrad |