473,387 Members | 1,569 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,387 software developers and data experts.

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 1013
> 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.InnerException.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
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...
1
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...
3
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...
0
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...
1
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 =...
7
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...
4
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...
0
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....
13
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...

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.