r/programminghelp • u/merchant_npc • Aug 14 '25
C# Cross Server file transfer
Currently having a dilemma at work where my current app (app A) is hosted on (server A). App A is used to upload attachments for an approval process.
App B which is hosted on server B which will be used by internal staff to validate those attachments.
I had suggested to my team that APP A could post the attachment on cloud and generate a URL to update an SQL DB which is accessible by APP B.
My boss then told me this attachment cannot be posted to the cloud. I’m not the best when it comes to networking or FTP but is there a (secure) way for this to be done between the 2 servers?
View all comments
Show parent comment
1
u/XRay2212xray Aug 15 '25
On server A, you would create a share to a folder or parent folder containing the attachments and set permissions on that share and the folders to allow the account your application is running under access (eg. right click on a folder and select properties and then use the sharing and security tabs to create a share and grant access). I'm guessing you are the developer, so it maybe more something that your systems operations folks setup for you if they are willing to allow it. Then you just directly access the files thru the path \\servername\sharename\filename like you would access any other files in your application on server b. Alternately, you can map a drive letter such as g: to \\servername\sharename and then access the files thru the g: drive as if its a local drive. You aren't copying files over to server b, just your application accesses them directly from server a as needed.