Original Post
I am trying to upload a new high score to my web site here is the code The last line throws an exception "An Exception occured during a webclient request" what am I doing wrong here? Grey
[Serializable]
public struct HighScoreData
{
public string PlayerName;
public int Score;
public int Level;
}
public HighScoreData data = new HighScoreData();
data.PlayerName = "Me";
data.Score = 15000;
data.Level = 10;
WebClient wc = new WebClient();
string internetURL = "ftp://www.mysite.com/HighScores.xml";
XmlSerializer serializer = new XmlSerializer(typeof(HighScoreData));
MemoryStream ms = new MemoryStream();
serializer.Serialize(ms, data);
byte[] bytData = ms.GetBuffer();
wc.Credentials = new NetworkCredential("username", "password");
byte[] response = wc.UploadData(internetURL,"POST", bytData);