How can I use the Webrequest Credentials Property to send an basic authentication header?
Why isn\'t the Authorization header send with the request even when
The server should send a HTTP 401 Not Authorized response code containing a WWW-Authenticate HTTP header.
WWW-Authenticate: Basic realm="example"
The PreAuthenticate property only works after authentication has taken place. From MSDN:
true to send an HTTP Authorization header with requests after authentication has taken place; otherwise, false. The default is false.
See other answers for more in depth explanation.