I have a .net core MVC controller that is downloading a file from a mapped drive on a server. It uses NetworkCredential to pass the username and password for the drive: