salve a tutti, ho un problema riguardo a scrivere un file di testo sul web.
il codice che uso è il seguente
codice:
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.CreateDefault(uri);
webRequest.Method="POST";
webRequest.Timeout=1000;
Byte[] data = Encoding.ASCII.GetBytes(nickname);
webRequest.ContentLength=data.Length;
//get the stream
Stream readStream = webRequest.GetRequestStream();
//write the stream
try
{
readStream.Write(data, 0, data.Length);
}
catch (Exception ex) {
return false;
}
finally
{
readStream.Close();
}
return true;
ma ricevo questo errore: Errore del server remoto: (405) Metodo non consentito
il server web è quello di aruba ed il file di testo risiede dentro la cartella public dove si hanno i permessi di scrittura.
cosa posso fare affinché riesca a scrivere il file?