473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

access denied error for file upload

Ok, here is the issue: I have 2 web pages one does a file upload to a
database and the other page does a FTP to a server, both pages use the
c:\temp directory.
The page that uploads to a database works fine, the page that FTP's the
files returns me an error (Access denied filename.txt)
Now the asp.net ID has full control of the c:\temp directory. The only
difference in the 2 pages is that page 2 creates a text file writes data to
it then FTP's it to the server. What could be causing my 'Access Denied'
error message?
Sep 28 '06 #1
1 3256
Hello igotyourdotnet,

From your description, you got the "access denied" error when running one
ASP.NET page which upload file to a FTP site. As you mentioned that
another page upload file to a database works correct and the two pages both
use the "c:\temp" directory, would you provide some detailed information on
how does the two pages use the c:\temp directory? For example,

**whether the two pages will first generate some file from other source and
put them in the c:\temp dir and then upload it to the target(database or
FTP)

** whether it is possible that the two page will access the same file?

** as you said that the problem page will first create a file and write
data into it, is this created file also used by any other application or
page?

You can also provide the detailed host environment of your ASP.NET
application(like server and IIS version ....)

Generally,for "Access Denied" error, possible causes are security
permission and file handle locking. I would suggest you try
troubleshooting the issue step by step. You can first break the code (such
as the creating file stage and the upload to FTP stage) to see in which
stage does the "Access Denied" error occur.

Also, if you have the VS IDE installed on the server that running the
pages, you can manually attach to the ASP.NET worker process and debug
through the page code to see at which point does the exception get thrown.

In addition, for such file access problem, the following tools are useful
for detecting NTFS file permission error and file handle lock:

#Filemon for Windows(for detect file access failure)
http://www.sysinternals.com/Utilities/Filemon.html
#Process Explorer(for check file handle ownership)
http://www.sysinternals.com/Utilitie...sExplorer.html

Please feel free to let me know if you have any new finding or questions.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.





Sep 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: paritycheck | last post by:
Hi Guys, I'm stuck with a terribly persistant "Access to the path *** is denied" problem. I'm trying to upload a foile using the file control. The code checks if a file of the same name as...
2
by: DA | last post by:
Hello, I'm hoping someone can help me here. I've got a form that when placed on a server running HTTPS, I get an "access denied" error in IE 6 (non-SP2 and SP-2) when a user tries to upload an...
1
by: mattrapoport | last post by:
I have a form with an input type='file' element. I click on the Browse button of my file upload element, select a file, and hit open. The file name appears in the textbox portion of the file...
1
by: HNguyen | last post by:
Access denied error while uploading a file to a web server. I am getting the following error while trying to upload a file to our web server: Error: Access to the path...
3
by: Randy | last post by:
Hello All, I'm getting a strange error when trying to perform a file upload. Here's the lines that uploads the file... sSaveLocation = Server.MapPath("PFPDocs") + "\\" + fileName;...
3
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
2
by: Paolo | last post by:
Hi to all, I have an error that drove me crazy. Try the following page that should only allow to upload a file: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">...
3
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be...
7
by: sforsasi | last post by:
Hi, I'm trying a simple code to upload a file to the server. When I click to Upload I get the following error message: Error: Access to the path xxx is denied The folder in which I'm trying...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.