ASPNET access to network folders

Discussion in 'ASP .Net' started by Brent Burkart, Oct 23, 2003.

  1. What steps must I take to ensure that my application will be able to access
    network folders. I want to only use the ASPNET account, but I am not sure
    how this is done.

    Brent Burkart, Oct 23, 2003
    1. Advertisements

  2. Give the aspnet account the necessary permissions.


    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Big Things are made up of
    Lots of Little Things.
    Kevin Spencer, Oct 23, 2003
    1. Advertisements

  3. Thanks Kevin,

    However, I cannot add the ASPNET account as a user to a folder not existing
    on the same machine as the application is running. Any ideas?

    Brent Burkart, Oct 23, 2003
  4. You have two ways to handle this:
    1. Create a Domain account and set your site to run as the Domain
    user instead of the local ASPNET user. Then, give the domain user access to
    the share.

    2. Impersonation In your web.config your can have the site "run as" a
    different user that would have access to the network share in question.

    If you do a search for Impersonation on google, you should be able to find
    everything you need to know about how to make either of these solutions
    work. If not, let me know and I can give you some samples. I don't have
    them handly right this minute.

    Michael Pearson, Oct 24, 2003
  5. There's a couple of approaches,

    1)Mirror accounts,
    (a) change the password of the aspnet account on your server to
    something you know of.

    (b) Create an identical account on the machine with the shared folder on
    it (eg aspnet) and
    give it the exact same password.

    (c) set the permissions for the folder with the account created on the
    remote machine

    (2) Change the account that is usede for the process or the unmanaged
    (a) Change the accont used to start the worker process, this is
    done in the
    machine.config file.
    Patrik Löwendahl, Oct 24, 2003
  6. Brent Burkart

    SF Guest

    SF, Oct 24, 2003
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.