After a user logs in to my web app (authenticating against Active Directory/LDAP) I need to connect to a windows network share on the same network (with their credentials/impersonating them) and access files they have access to so that they can be made available in the web app. This is running on IIS/Windows.
The only way I found that partially works, is mapping a network drive using their credentials, querying for the files they requested, then deleting the network drive (which isn't deleted most of the time), this seems insecure and inefficient for production use.
Is there a better option?