Craig Deelsnyder wrote:
On Thu, 08 Sep 2005 14:51:30 -0500, flipdoubt <fl*******@nosp am.com>
wrote:
I have an application that stores paths as UNCs in a database. I want
ASP.NET to move files from a UNC to a web accessible location, but
I'm having the hardest time getting the app to access the UNC even
when the UNC points to the machine running ASP.NET. What magical and
voodoo must I perform to Access a UNC from an ASP.NET application?
Make sure the aspnet user (the account asp.net is running as) has
read/write(/full control?) access to the folder shares in question.
I personally wouldn't do that. If you do that, you are giving all
applications running on the box (or in the app pool on Win2003) full
control. Because ASPNET is a local account, you will also have to do a bit
of work to enable pass-through authentication if the UNC is on a different
box (which it will be in a real-world scenario.) The result is that you
have weakened your security.
A better idea would be to use impersonation. Using P/Invoke to impersonate
a user in code is the best option because it allows you to elevate
privileges temporarily and then revert back to a weak account.
http://support.microsoft.com/default...B;EN-US;306158
--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
FrontPage add-ins for FrontPage 2000 - 2003