ASPNET access to network folders

  • Thread starter Thread starter Brent Burkart
  • Start date Start date
B

Brent Burkart

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.

Thanks,
Brent
 
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?

Thanks,
Brent
 
You have two ways to handle this:
1. Create a Domain account and set your ASP.net 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
 
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
thread.
(a) Change the accont used to start the asp.net worker process, this is
done in the
machine.config file.
 
Back
Top