I've problem with settings on remotely server (Windows 2012 r2) via remote desktop for sending files to SharePoint from my program.
First.. My program (program is a console application in .Net 4.6 and is on IIS8, for testing is WebService SOAP - program using web reference...) get data from database, next program generate file excel and write data in here. After our file is generated and ready, program read data user. (this is worked)
next when user is ready, program use WebClient (on C#), next is authorize and is trying upload by client.Upload but here connection is broke on server.. (in locally this is working, use IIS express - locally [Windows 10 Enterprise], on server - IIS8 [Windows 2012]).
and I have error in server: The underlying connection was closed: An unexpected error occurred on a send......System.....
when I debbugged with remotely debbuger on serwer I saw this: 
My script where is broke connection on the server (debugger is end here - client.UploadFile(CopyPath + @"/" + ExcelFile.Name, "PUT", ExcelFile.FullName);):

I am asking for culture to be preserved and please not negatively me assessed as this code is from the previous owner. I do not have a contact with it and I need this code to automatically submit a report in the Scheduler. All the rest work except sending a file on the server to SharePoint. I have to keep the rules because such requirements in my job :/
Best regards Domino
Ps. If I did not give enough details, ask me go ahead. I will answer the fastest!