Link to home
Start Free TrialLog in
Avatar of TMPSupport
TMPSupport

asked on

File Upload Problem

I'm having for following problem when my page tries to save an uploaded file to a folder on the server.

I have the file save path saved in the web config.  When I upload a file it reads this path however I get the following error message.


Could not find a part of the path "C:\WINNT\system32\postcards\Sample.jpg".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\WINNT\system32\postcards\Sample.jpg".


I know that the app is reading from the web.config file because I can change one letter in the path and the path in the error message will change to the erroneous path from the web.config file.

It appears that when the web.config file contains the correct path it tries to save the file to C:\WINNT\system32 instead of the path specified.

*Details*
Windows 2k3
Impersonation ON
Impersonation Account has Full Permission to target path
Target is not a share (doesn't matter because i've tried either/or and still not working)

Has anyone else seen this problem before?


Avatar of TMPSupport
TMPSupport

ASKER

Closer inspection of my code revealed that I am a moron.  This question can be closed.  
ASKER CERTIFIED SOLUTION
Avatar of dfu23
dfu23

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just curious ... what was the issue?
When I moved my code to production I removed the "LocalUploadPath" key from web.config since it wasnt needed anymore, however I neglected to remove the associated local upload code....hence the moron reference. :-D