I am trying to download files from sharepoint using BITS,but I am getting the below error while doing so.
Error Code: -2145844845 Error Description: HTTP status 403: The client does not have sufficient access rights to the requested server object.
Error Context: Remote_File Error Context Description: The error occurred while the remote file was being processed.
Some Points to be noted
- I am able to download the files between two local shares within theP network and also download a picture file from another website.
- Also I am able to browse the sharepoint path and see the content of the file in the browser.
- BITS is running under the LocalSystem credential.
Please do let me know if I am missing anything here.
Did you set the BitsCredentials object properties correctly for the type of authentication that your web server is configured for? i.e. Basic or NTLM
// Set User Credentials
bitsCredentials = new BitsCredentials
UserName = Username,
Password = Password,
AuthenticationScheme = AuthenticationScheme.Ntlm,
AuthenticationTarget = AuthenticationTarget.Server