Permissions Help with asp.net saving uploaded files

D

darrel

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
 
D

darrel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top