WebClient.UploadFile error (2nd post)

S

Saverio Tedeschi

Hi all gurus, forgive me if I submit a 2nd post, but I'm no more able to see
my question. So:
I wrote an Win app with embedded FTP client (well, made some cut and paste
from others' projects :)) to receive and send files from within the app
itself. Now the server I connect to (IIS 5, W2K Svr+SP4) from 1st Jan on
will allow just
http/https connection, so I can no longer use FTP. I've thought to use
System.Net.WebClient class and DownloadFile/UploadFile method, but when I
try UploadFile only obtain a message, described later in detail, while
download goes well. Can pls some1 point me to the right direction? How can I
enable POST on IIS, if this is the problem? TIA

Error message follows:
"System.Net.WebException: An exception occurred during a WebClient
request. ---> System.IO.IOException: Unable to write data to the transport
connection. ---> System.Net.Sockets.SocketException: Connessione in corso
interrotta forzatamente dall'host remoto
at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at System.Net.WebClient.UploadFile(String address, String method, String
fileName)
--- End of inner exception stack trace ---
at System.Net.WebClient.UploadFile(String address, String method, String
fileName)
at System.Net.WebClient.UploadFile(String address, String fileName)
at WebApplication1.WebForm1.Button1_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:line 31" String".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top