Can I transfer files from windows file server to the application level on a web server without mapping its' OS (OS of the web serv)?

Hajar HACHAMI 21 Reputation points
2022-03-10T14:47:02.817+00:00

Is it possible to use/find an API that can transfer a file from the "file server" (windows) to the "web server" (specifically straight to the app like ".NET" or IIS) without mapping it on the OS? If such a way does exist, what is it?

Internet Information Services
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,449 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 49,251 Reputation points
    2022-03-10T15:32:39.637+00:00

    Yes and no. A file share is needed on the remote server to transfer files. No way around this. However that doesn't mean you need a mapped drive to do it as you can use a UNC path. The file share determines who can access the files on that share and is applied first. Only if a user has permissions to the files on that share do we then get into NTFS permissions of the file system. Hence without a file share nothing works.

    Having said that, out of the box every drive has an admin share (C$, D$, etc). This share allows an admin access to the file system. To use it you must have admin privileges on that machine but assuming that you then have access to the entire disk, barring NTFS permissions. But this is a security hole and is exploitable so every secure IT department I know of disables this share so it is not accessible.

    From a security standpoint the best option is to create a file share to the exact directory that you need remote access to. This limits the surface area if a malicious user gains access to that share. You should also lock down the share to only those users/groups that need access. This is just good security. If you really, really need to access multiple directories within the same directory structure then you could create the share higher up but I wouldn't ever expose the whole disk (or Windows directory, or System) as a file share. The security risks are just too high.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Hajar HACHAMI 21 Reputation points
    2022-03-11T10:28:52.387+00:00

    I need to know which APi interact with the file server and the applications in the web server ?


  2. Hajar HACHAMI 21 Reputation points
    2022-03-11T18:54:54.81+00:00

    Okay, thank you so much.

    0 comments No comments