Solved

File Upload Problem

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

10 Experts available now in Live!

Get 1:1 Help Now