I need to be able to access files on password proteceted network file shares from my ASP.NET app.
The username, password and DOMAIN are loaded from the secure database at runtime. I'd like to use System.IO File and Directory classes to work with files and directories on those shares. I was planning on using UNC names for file/directory path (something like \\server\share\path\file.ext). How can I specify username, password and domain to use when accessing such UNC path using System.IO? Giving ASP.NET account necessary rights or changing the ASP.NET account impersonation is not an option. For time being I've added a reference to the Windows Scripting Host object and am using WshShell component to execute command line commands like 'net use \\server\share password /u:user\domain' which would map to the share when needed. Is there a native .NET way of doing this without using WSH? Thank you :) =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com