Reputation: 2983
I have an app that needs to update a txt file on another server. The asp.net app runs under iis6.0. Ive tried setting the permissions on the share for the server that runs the app. e.g DOMAIN\ServerA$ however it still says access to path blah blah is denied.
Any ideas?
Upvotes: 0
Views: 185
Reputation: 32430
This may not be exactly what you're looking for, but if you have a specific userId and password that can access the network share, you can use the code here: http://support.microsoft.com/kb/306158
Upvotes: 0
Reputation: 37543
First make sure that the path is accessible to the server at all by going their manually using your own account. I don't know anything about your set up where you are (major corporation, mom-and-pop shop, whatever), but if there are security blockages on the network this may be an impossibility to start with. As an example, where I am security does not allow servers to communicate with each other in some of our domains through certain protocols/ports. So if I attempted something like this it would fail automatically because of the firewall restrictions.
Once you're sure the connection can be made, verify that the user account applied to the website's application pool has permission to make the connection. By default this account is set to "Network Service" and it is a local account. This will deny the website such permission. You will need to set this account to domain level service account and make sure that account has permission to make the connection.
Upvotes: 0
Reputation: 3372
You should change in IIS pool identity to user that has permission to folder that you are trying to update.
Upvotes: 1
Reputation: 13285
Check that the app isn't passing the user's credentials to the share, e.g Identity.Impersonate
or via Windows auth or similar.
Check you have the right account/machine names by writing HttpContext.Current.User.Identity.Name
and HttpContext.Current.Server.MachineName
to the page.
Upvotes: 0