Hallo,
System.Diagnostics.Debug.WriteLine("Pfad:" + string.Format("http://" + eineapp.url + "/upload.php"));
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(string.Format("http://"+eineapp.url+"/upload.php"));
Gibt hier noch die richtige URL aus, und dann beim request, fehlt auf einmal der /
Fehlermeldung:
Pfad:
>
Eine Ausnahme (erste Chance) des Typs "System.Net.WebException" ist in System.dll aufgetreten.
Eine Ausnahme (erste Chance) des Typs "System.Exception" ist in GastroApp.dll aufgetreten.
Error Pictureupload:System.Exception: Error uploading fileSystem.Net.WebException: The remote name could not be resolved: 'www.orf.deupload.php'
at System.Net.HttpWebRequest.GetResponse()
Unsere Website
iPhone Programmierung | Android Programmierung
Also wenn ich diese Zeile hier ausführe:
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://orf.de/upload.php");
bekomme ich keine Exception
Life is a short
Wenn du allerdings das machst:
string murl = string.Format("http://{0}/upload.php", "mydainingu.de") ;
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(murl);
bekommst du eine Exception.
Nur wenn du
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://mydainingu.de/upload.php");
direkt machst, bekommst du keine, das versteh ich nicht
Unsere Website
iPhone Programmierung | Android Programmierung
Wenn du allerdings das machst:
string murl = string.Format("http://{0}/upload.php", "mydainingu.de") ; HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(murl);
bekommst du eine Exception.
C# sagt nein.
FastSharp sagt auch nein.
Life is a short
Es lag am http redirect, ruft im browser auf:
http://mydainingu.de/upload.php
Dann werdet ihr weitergeleitet auf:
http://www.mydainingu.deupload.php/
Unsere Website
iPhone Programmierung | Android Programmierung