File Upload Access Problems

Discussion in 'ASP .Net' started by ^MisterJingo^, Aug 7, 2006.

  1. Hi all,

    On a 2.0 app i'm working on I'm attemtping to get file uploads to
    work. I have given the ASPNET process full access to the upload
    directory, but I still get an access densied error. If I set user
    account to full accesses then the file uploads fine. The problem is,
    the server guys do not want the user account to have such permissions.
    How do i go about resolving this? I would have thought giving the
    ASPNET process permissions would have been enough.
    Any help would be appreciated.

    Ps The server is running IIS 6
    ^MisterJingo^, Aug 7, 2006
    #1
    1. Advertising

  2. Have you set identity impersonate='true' in web.config file?

    Set it to 'false' to carry out upload operation in the context of 'ASPNET'.

    Regards,
    Augustin

    "^MisterJingo^" wrote:

    > Hi all,
    >
    > On a 2.0 app i'm working on I'm attemtping to get file uploads to
    > work. I have given the ASPNET process full access to the upload
    > directory, but I still get an access densied error. If I set user
    > account to full accesses then the file uploads fine. The problem is,
    > the server guys do not want the user account to have such permissions.
    > How do i go about resolving this? I would have thought giving the
    > ASPNET process permissions would have been enough.
    > Any help would be appreciated.
    >
    > Ps The server is running IIS 6
    >
    >
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=, Aug 7, 2006
    #2
    1. Advertising

  3. Augustin Prasanna wrote:

    > Have you set identity impersonate='true' in web.config file?
    >
    > Set it to 'false' to carry out upload operation in the context of 'ASPNET'.
    >
    > Regards,
    > Augustin
    >


    Hi Augustin,

    I've just set up an account to use for impersonation. This works fine
    with some projects, but it causes one of them to stop working. The
    project in question is a large portal that uses forms authentication,
    utilising a mySQL role provider. When impersonation is enabled on this
    application, no user can log in.
    ^MisterJingo^, Aug 7, 2006
    #3
  4. I have tried this out in the past and i didnt have any issues. I didnt get
    what you meant by 'but it causes one of them to stop working'.

    Did you mean 'MySQL role provider' works only when impersonation is enabled?

    you can even try impersonating for a specific piece of code instead of doing
    that for the entire app.

    - Augustin

    "^MisterJingo^" wrote:

    >
    > Augustin Prasanna wrote:
    >
    > > Have you set identity impersonate='true' in web.config file?
    > >
    > > Set it to 'false' to carry out upload operation in the context of 'ASPNET'.
    > >
    > > Regards,
    > > Augustin
    > >

    >
    > Hi Augustin,
    >
    > I've just set up an account to use for impersonation. This works fine
    > with some projects, but it causes one of them to stop working. The
    > project in question is a large portal that uses forms authentication,
    > utilising a mySQL role provider. When impersonation is enabled on this
    > application, no user can log in.
    >
    >
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=, Aug 7, 2006
    #4
  5. Augustin Prasanna wrote:
    > I have tried this out in the past and i didnt have any issues. I didnt get
    > what you meant by 'but it causes one of them to stop working'.
    >
    > Did you mean 'MySQL role provider' works only when impersonation is enabled?
    >
    > you can even try impersonating for a specific piece of code instead of doing
    > that for the entire app.
    >
    > - Augustin
    >


    Hi Augustin,

    The project i'm working on (which I took over from someone else) is an
    authenticated portal which contains many smaller applications. The main
    portal uses a role based authentication model, utilising a MySQL DB. If
    I use impersonation in the smaller applications web.config's, it works
    fine. But if I try using authentication in the main portals web.config
    then it fails to authenticate a users login. I'm not sure why it's
    doing this, but i'm looking into it.
    Out of curiosity, how do you impersonate a specific piece of code?
    ^MisterJingo^, Aug 7, 2006
    #5
  6. Check out http://support.microsoft.com/kb/306158/ for details on how to
    impersonate an user account for a specific piece of code.

    "^MisterJingo^" wrote:

    >
    > Augustin Prasanna wrote:
    > > I have tried this out in the past and i didnt have any issues. I didnt get
    > > what you meant by 'but it causes one of them to stop working'.
    > >
    > > Did you mean 'MySQL role provider' works only when impersonation is enabled?
    > >
    > > you can even try impersonating for a specific piece of code instead of doing
    > > that for the entire app.
    > >
    > > - Augustin
    > >

    >
    > Hi Augustin,
    >
    > The project i'm working on (which I took over from someone else) is an
    > authenticated portal which contains many smaller applications. The main
    > portal uses a role based authentication model, utilising a MySQL DB. If
    > I use impersonation in the smaller applications web.config's, it works
    > fine. But if I try using authentication in the main portals web.config
    > then it fails to authenticate a users login. I'm not sure why it's
    > doing this, but i'm looking into it.
    > Out of curiosity, how do you impersonate a specific piece of code?
    >
    >
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=, Aug 7, 2006
    #6
    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. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,424
    Bruce Barker
    Aug 3, 2005
  2. Heather Fraser
    Replies:
    0
    Views:
    615
    Heather Fraser
    Jul 5, 2004
  3. Replies:
    1
    Views:
    916
    Gabriel Genellina
    Nov 25, 2006
  4. Prakash
    Replies:
    3
    Views:
    442
    Ray at
    Nov 12, 2003
  5. DJ Stunks
    Replies:
    1
    Views:
    169
    J. Gleixner
    Jan 23, 2006
Loading...

Share This Page