Problem with sending file to SharePoint from remotely Windows server 2012 r2 by IIS8 asmx

tunemy15 1 Reputation point
2021-06-24T09:54:42.223+00:00

I've problem with settings on remotely server (Windows 2012 r2) via RDP for sending files to SharePoint.

So.. First.. My program (program is as The is a console application in .Net 4.6 in IIS8, in for testing is as WebService SOAP - program use web reference...) get data from database (this is worked), next program generate file excel and write data in here. After our file is generated and ready, program read data user.

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, on server - IIS8).

and I have error in server: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

when I debbugged with remotely debbuger on server I saw this:

My script where is broke connection on the server (debugger is end here - client.UploadFile(CopyPath + @"/" + ExcelFile.Name, "PUT", ExcelFile.FullName);): enter image description here

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!

Internet Information Services
{count} votes