Autor Beitrag
estrella1410
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Mi 02.04.08 11:50 
Hallo,
ich habe da ein Problem...
eigentlich klappt es immer bei mir ne ftp verbindung herzustellen doch jetzt bei meinem neuen programm kommt die meldung: Die Verbindung mit dem Remoteserver kann nicht hergestellt werden.

ich stelle mal meinen code rein: speziell die zeile wo diese meldung auftritt.

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
                FtpWebRequest req = (FtpWebRequest)WebRequest.Create(url);
                req.Method = WebRequestMethods.Ftp.DownloadFile;
                req.Credentials = new NetworkCredential(username, password);
                req.UseBinary = true;

                //stellt uri-Antwort bereit
                using (WebResponse resp = req.GetResponse())
                {
                    using (Stream respStream = resp.GetResponseStream())
                    {
                        Byte[] buffer = new Byte[4096];
                        int count;
                        using (FileStream f = new FileStream(filename, FileMode.Append))
                        {
                            do
                            {
                                count = respStream.Read(buffer, 0, buffer.Length);
                                if (count > 0)
                                {
                                    f.Write(buffer, 0, count);
                                }
                            }
                            while (count > 0);
                        }
                    }
                }


was ich abholen möchte ist eine ".log" datei, welche dort auf C:/ liegt..

kann mir da jemand nen rat geben?

gruß jessy

Moderiert von user profile iconChristian S.: Code- durch C#-Tags ersetzt
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 02.04.08 23:20 
Hast Du denn per FTP überhaupt Zugriff auf "C:\"? Fände ich eher merkwürdig :gruebel:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
estrella1410 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Fr 04.04.08 06:40 
kann man via ftp denn nicht darauf zugreifen ? dann wäre ich nun ratlos womit man das denn dann machen könnte hättest du da vielleicht nen tipp?
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Fr 04.04.08 11:02 
Du solltest erst einmal die Frage beantworten, ob das tatsächlich nicht geht. Probier doch mal mit einem 08/15 FTP-Client drauf zuzugreifen und schau, ob der das kann.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
estrella1410 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Fr 04.04.08 11:17 
inwieefern 08/15 client ? erklär das bitte mal genauer ...
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Fr 04.04.08 11:27 
user profile iconestrella1410 hat folgendes geschrieben:
inwieefern 08/15 client ? erklär das bitte mal genauer ...
Du kannst Dir ausm Internet irgendein FTP-Programm runterladen und gucken, ob Du damit Zugriff auf "C:\" bekommst. So findest Du raus, ob das überhaupt geht.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
estrella1410 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Mi 23.04.08 11:32 
also ich habe nu einiges probiert und es scheint nicht zu klappen....wüsste jemand eine andere methode wie man auf lokale platten von servern zugriff hat um dokumente auszulesen...?