runtime: HttpWebRequest doesn't send Digest authentication

Test program:

using System;
using System.Net;

namespace HttpTest
{
    class Program
    {
        static void Main(string[] args)
        {
            HttpWebRequest webRequest = WebRequest.CreateHttp("https://mail.emclient.com/webdav/test@emclient.com");
            webRequest.Method = "PROPFIND";
            webRequest.Credentials = new NetworkCredential("test@emclient.com", "<some password>");
            using (var response = webRequest.GetResponse())
            {
                // Should get here
            }
        }
    }
}

When targetting NetFX 4.5 the program successfully sends HTTP authentication headers and fulfills the request if the password is correct. This can easily be verified with Fiddler.

On .NET Core 2.1 and 3.0 (master from around last Friday) on Windows it doesn’t even try to send the authentication headers.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed in release/2.2 with PR dotnet/corefx#32920

Yes, but I am quite busy at the moment. Maybe tomorrow or early next week.