Solved

File Upload Problem

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to refer to value 8 82
Winform Module - What is the ASP.Net equiv 2 40
Where does legacy ASP.NET initialize language? 2 64
ASP.NET Calendar Control 5 30
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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