472,368 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,368 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 3190
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.