Solved

File Upload Problem

Posted on 2006-07-07
4
224 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Save ms data to server side. 19 55
asp.net input html code have it display the content 2 22
Iteration Help (Asp.net VB) 5 24
ASP.NET Content Page 3 29
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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