Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 3rd, 2006, 01:32 PM
Authorized User
 
Join Date: Apr 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't Move Network File

Hi,
 I grant access to my localhost/website under directory security to a network user which has access to a file that I attempted to move but I got "Could not find file" error message. When I moved the code to a web server, I got a different message "Access to the path "\\NetLoc\CRWebReports\Temp\Contracts\contract_new .pdf" is denied." I try both a non network and network user on the web server and it still get error but at least it see the network drive.

My code is: System.IO.File.Move("\\NetLoc\CRWebReports\Temp\Co ntracts\contract.pdf", "\\NetLoc\CRWebReports\Temp\Contracts\contract_new .pdf")

What other security setting do I need to do? Where are the settings?

Thanks

Peter
__________________
Peter
 
Old September 3rd, 2006, 02:34 PM
Authorized User
 
Join Date: Apr 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Seem that I found my own solution. Still need to do more testing but it seems to work so far. I simply add:
<identity impersonate="true|false"
          userName="domain\username"
          password="password"/>
to my web.config file.

Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
File.Move reports file as in use DanRoche C# 3 May 3rd, 2007 07:27 AM
Check if a file exists on network darrenb Access VBA 2 March 27th, 2007 07:15 PM
File Upload/Move surendran VB How-To 0 July 19th, 2006 04:31 AM
Network File Permissions Pope ASP.NET 1.0 and 1.1 Professional 2 January 12th, 2006 12:42 PM
Move a file via code fordrs3 VB How-To 2 June 26th, 2003 01:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.