Is there a way to have one piece of code run under a different user account than the ASP.NET user account on a system?

I have a need to grab a listing of files, and the ASPNET account doesn't have access to the folders where these files are. Another user account does, and I would like to use that account of possible. I don't do much web development, so I don't know exactly what my options are for doing this.

I could create a shim app that runs under the required credentials and creates a temp file that the ASPNET account could read, but that creates more complexity than I would like, unless this is my only option.

Granting the ASPNET account access to the folders could possibly be an option (I only need read access for this) but I figured that should be a last resort. I also don't even know if it will work since these folders are actually a windows home server JBOD share, not your typical file folder.