Discussion on:
View:
Show:
This code stuff has been around as long as Delphi.There is no place that you could type this code and have it work.This is not software writing.Some of these script lines are even recorded from the CPU and BIOS.I could open a dll in a C# interpreter program and see what you have copied and pasted here.To date,however,I could not do this because the Microsoft project folder is needed.
I know I'm going to hate it, but I open it anyway. Sure enough, it's full of those unidentifiable rubbery green bits and the smell of cheap alcohol.
I'm not exactly sure what you're trying to get at but this is the second article of mine you've said this about.
Are you trying to say I'm decompiling some MS software and publishing the code?
Are you trying to say I'm decompiling some MS software and publishing the code?
First, BALTHOR almost never returns to defend any of his statements or respond to questions.
Second, he rarely knows what he's talking about. Check his profile and look at some of his previous postings. His DST rants from early this year are particularly enlightening.
Second, he rarely knows what he's talking about. Check his profile and look at some of his previous postings. His DST rants from early this year are particularly enlightening.
Please let the rest of us, because we have all tried to figure him out at one time or another.
I give up, and don't even read his posts anymore. Which is a shame, because from past experience. You can tell he has knowledge... He is waisting what he knows by posting here, because we all ignore him anymore because of the way and manner he rants and runs.
Dan
I give up, and don't even read his posts anymore. Which is a shame, because from past experience. You can tell he has knowledge... He is waisting what he knows by posting here, because we all ignore him anymore because of the way and manner he rants and runs.
Dan
It's C#
You should consider bracketting the stream instantiation (at least) with using as well.
It's a good habit to develop.
You should consider bracketting the stream instantiation (at least) with using as well.
It's a good habit to develop.
So, its a good sample of using managed code to FTP. Nothing wrong with it..
Hey, can I have some of what you guys are smokin
We use JustFTP in a script overnight to transfer files.
Bye.
Hey, can I have some of what you guys are smokin
We use JustFTP in a script overnight to transfer files.
Bye.
Using is a good habit to develop and I guarantee if you compile this code with your trusty GNU compiler it will blow chunks.
Because it's not C
Because it's not C
I totally agree and in production code I make extensive use of using(){}.
For anyone wondering what we're talking about, here is an example:
The code in my article looks like this:
StreamReader stream = new StreamReader("c:\test.txt");
//Do something with the stream
stream.Close();
There is an alternative to this code that ensures the stream is closed without having to explicitly call stream.Close() - that code is shown below:
using (StreamReader stream = new StreamReader("c:\test.txt"))
{
//Do something with the stream
}
For anyone wondering what we're talking about, here is an example:
The code in my article looks like this:
StreamReader stream = new StreamReader("c:\test.txt");
//Do something with the stream
stream.Close();
There is an alternative to this code that ensures the stream is closed without having to explicitly call stream.Close() - that code is shown below:
using (StreamReader stream = new StreamReader("c:\test.txt"))
{
//Do something with the stream
}
is some poor naive fool believing that guff about not having to manage resources.
If you don't help the garbage collector, you end up with litter everywhere and it's obvious to very one but 'you'
If you don't help the garbage collector, you end up with litter everywhere and it's obvious to very one but 'you'
I am getting the following error
: "The remote server returned an error: (530) Not logged in." Please help me solve this. Thanks a lot in advance
: "The remote server returned an error: (530) Not logged in." Please help me solve this. Thanks a lot in advance
From the code, that would suggest the FTP server doesn't recognise your credentials.
Hello, This is realyy a great example. Tahnk you very much. It really helped me
But I have a problem when downloading the file.First I tried with an txt file. Worked fine. But now I'm testing with an xml file. It overwrites the existing file. That's good too. Bur the problem is the file is not downloading complete and Everytime it changes. For example sometimes it downloads half and sometimes full and sometimes only few text at the end is missing. What can do about it. Can you please help me? Thanks again :))
But I have a problem when downloading the file.First I tried with an txt file. Worked fine. But now I'm testing with an xml file. It overwrites the existing file. That's good too. Bur the problem is the file is not downloading complete and Everytime it changes. For example sometimes it downloads half and sometimes full and sometimes only few text at the end is missing. What can do about it. Can you please help me? Thanks again :))
file.Flush();
before file.Close();
might fix it.
You need to go through on debug and make sure have the entire content in byte[], if so either flush, or creating the file in a using block might fix your problem.
before file.Close();
might fix it.
You need to go through on debug and make sure have the entire content in byte[], if so either flush, or creating the file in a using block might fix your problem.
I didn't have time to test again but I'll try your suggesstion. I think file.Flush(); can work. Thanks again.
I really appreciated it. Thank you. But can I have the sample in Visual Studio 2008 version. I fail to convert from the current version.
Excellent Example but there is need to set the null value in property of proxy of WebClient Object if ISA server is on client side.
e.g.
request.proxy = null;
e.g.
request.proxy = null;
I use FtpWebRequest to download multiple files from the server.but when use reqFTP.Credentials to send request, it creates too many connections.how to open a connection and file down a lot, this is my code:
reqFTP = (FtpWebRequest) FtpWebRequest.Create (Uri));
reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential (ftpUserID, ftpPassword);
FtpWebResponse response = (FtpWebResponse) reqFTP.GetResponse ();
reqFTP = (FtpWebRequest) FtpWebRequest.Create (Uri));
reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential (ftpUserID, ftpPassword);
FtpWebResponse response = (FtpWebResponse) reqFTP.GetResponse ();
- Keyboard Shortcuts:
- Prev
- Next
- Toggle

































