I am running a docker window container which is running a window service . It is trying to load a file from On-Premise file server. I have tried to map the file server path inside container using "net use" command with different credentials who have access to the file server path. After that I have used "CMDKEY" commands to authenticate the file server. I am able to do that but while application is running it is not able to access that file. I am getting access denied error. Can anyone help me on this?
For more information, I have run the IIS as well to keep container alive.
Net Use command: Net use * "" /user:<username> /p:yes
CMDKey command cmd.exe /C "cmdkey /add: /user:<username> /pass:"
While doing the same thing with Console Application, I am able to access the file server path from inside container but not working for window service.