I have a windows client application where users are uploading large files to our servers. We are creating a job and not adding credentials (using Windows Auth). However, I am having some problems getting authentication to work. My server is returning a
401 with fhe following headers. It does not look like BITS is responding with an authorization header, and is instead, just erroring the job.
Note that this works when I am uploading a file to a BITS server locally, but once I deploy this into our environment, I cannot upload from my machine to the server.
Below are the headers from the BITS_POST response.
HTTP/1.1 401 Unauthorized
Date: Fri, 02 Aug 2013 14:51:11 GMT
I know this is old, but here is how I do it:
BitsCredentials bc = new BitsCredentials();
bc.AuthenticationScheme = AuthenticationScheme.Ntlm;
bc.UserName = _sDomain + @"\" + _sUsername;
bc.Password = _sPassword;
bc.AuthenticationTarget = AuthenticationTarget.Server;