473,698 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Permissions Help with asp.net saving uploaded files

I have a function that uploads a file to a specific directory, making the
directory if it doesn't already exist.

This works, unless I try to upload a file to a pre-existing directory. If I
do that, I get this vague error:

Exception has been thrown by the target of an invocation.

From what I can tell, this is maybe a permissions issue?

'aspnet_wp account' has full control over the parent directory and any
directory it makes. The only oddity is that upon first creation of a
directory, I get prompted by the browser to enter my own network
username/pwd.

I'm completely stuck on this and really have no idea what to check for. Is
there anyway to get a more specific error message out of the application
than the one above?

-Darrel
Nov 19 '05 #1
1 1020
> I'm completely stuck on this and really have no idea what to check for. Is
there anyway to get a more specific error message out of the application
than the one above?


Aha. I figured that part out:

exc.InnerExcept ion.Message

Which gives me a much more specific answer...access denied for the
particular directory I'm trying to save to.

So, what should I check for? What is odd is that my application is just fine
creating the directory and then immediately uploading some files to it. It's
only on subsequent attempts does it get the access deined error.

-Darrel
Nov 19 '05 #2

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

Similar topics

3
3204
by: lawrence | last post by:
I've two scripts, one to upload images, another to delete them. The upload script works fine, but the delete script has permissions trouble. How can PHP not have permission to delete an image it itself uploaded? Here is the delete script I'm using right now, and the error messages I got below.
1
3630
by: Sielvja | last post by:
Hi, i've put an upload script on my site, hosted on a Windows NT Version 5.0 server. When i try to upload something i get an error: copy(files/file.txt): failed to open stream: Permission denied in d:\sites\matita.be\website\uploaded.php on line 20 Could not copy
3
1449
by: Mike Wasilewski | last post by:
I created a (real estate) site which has an area that is used by the agent to post and edit property listings. They have the ability here to upload pictures. If the listing is new, it is assigned an ID, info posted to database and a directory created using the ID to hold the uploaded pics. The problem I have is that when they add a listing and the directory gets created, it is uid/gid apache/apache, and this should work fine for web...
0
1485
by: Tracy Tripp | last post by:
I'm working on a program that takes files by path and moves them into new locations, and then back again if the user intends. Everything is great so far except I cannot figure out how to keep directory permissions. File permissions are no problem, but when I try and put a directory's permissions back, I, the user, lose all access to that directory. When I give myself permission again, all my files have kept their permissions. Here are...
1
5155
by: terrorix | last post by:
I want to save uploaded file to disk. I have this construction: HttpPostedFile myFile = ((HttpRequest)Request).Files; if (myFile != null) { string fn = "c:\\Inetpub\\wwwroot\\MyWeb\\upload\\File_1"; try { myFile.SaveAs(fn); lblMsg.Text = "File was uploaded and saved successfully!";
7
476
by: none | last post by:
Hello: I had a nice php application running on my server here at home, and I uploaded it to a shared public type server and it started to break all over the place. It turns out that some scripts required higher permissions that others, but I can't figure out what the difference is. They all read from the database. Some write to the database, but not all the ones that require higher permissions do. I don't understand what it is about...
4
10547
by: Tony B | last post by:
I've moved an existing site (which I didn't write) from a apache/php/mysql host under windows to a linux apache/php/mysql host. I've sorted out most problems except one. There is an upload function on the site, which uploads files via POST to temp folder and then moves it into a folder on the host using php function move_uploaded_file. Under windows this works fine but on the linux host the uploaded file is created with 600 permissions so...
0
1398
by: Tim Payne | last post by:
I have an odd permissions issue with uploading files to a windows 2003 server. I have a reasonably unusual setup. We have a php website, running through IIS that was written to use mod_rewrite. Obviously, this doesn't exist in IIS, so as a workaround, I have the .net isapi dll as a wildcard handler for the site, with the rewriting done by .net, which then passes the processng back to the php pages. So far so good. When I attempt to...
13
2656
by: eclipsme | last post by:
I thought I had this licked, but apparently not. I have a file upload script that attempts to upload a file to a directory in the public_html directory - www.domain.com/upload The permissions for the directory have to be 777 for this to work or esle it aborts with a permissions error - obviously a problem. The php script runs as user 'nobody'. Tech support is through email, and level one is not that bright, or at
0
8608
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8870
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7734
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6524
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.