Solved

File Upload Problem

Posted on 2006-07-07
4
218 Views
Last Modified: 2010-05-19
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?


0
Comment
Question by:TMPSupport
  • 2
  • 2
4 Comments
 

Author Comment

by:TMPSupport
ID: 17060912
Closer inspection of my code revealed that I am a moron.  This question can be closed.  
0
 
LVL 14

Accepted Solution

by:
dfu23 earned 500 total points
ID: 17061142
Don't be hard on yourself ... we are all human.
0
 
LVL 14

Expert Comment

by:dfu23
ID: 17061568
Just curious ... what was the issue?
0
 

Author Comment

by:TMPSupport
ID: 17061587
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
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now