Permissions Help with asp.net saving uploaded files

Discussion in 'ASP .Net' started by darrel, Jun 10, 2005.

  1. darrel

    darrel Guest

    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
    darrel, Jun 10, 2005
    #1
    1. Advertising

  2. darrel

    darrel Guest

    > 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
    darrel, Jun 10, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt G
    Replies:
    1
    Views:
    1,148
    Deepak Kumar Vasudevan
    Aug 22, 2003
  2. Scott Allen
    Replies:
    0
    Views:
    432
    Scott Allen
    Jul 13, 2004
  3. =?Utf-8?B?Q2hyaXM=?=

    scan files uploaded via asp.net

    =?Utf-8?B?Q2hyaXM=?=, Jun 17, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    488
    Lau Lei Cheong
    Jun 17, 2005
  4. RedHair
    Replies:
    4
    Views:
    852
    RedHair
    Feb 21, 2006
  5. Replies:
    1
    Views:
    699
Loading...

Share This Page