Send HTTP request with "Negotiate Authorization"
<p>How can I send an HTTP request with Negotiate Authorization header attribute from a .NET (C#) application?</p>

<p>I tried the following, but Authorization attribute was not added to the request...</p>

<pre><code>...
string url = ...;
WebRequest request = WebRequest.Create(url);
request.Credentials = GetCredential();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
...

private CredentialCache GetCredential()
{
    string url = ...;

    CredentialCache credentialCache = new CredentialCache();
    credentialCache.Add(new System.Uri(url), "Ntlm", new NetworkCredential(username, pwd, domain));
    return credentialCache;
}
</code></pre>