-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NTLM Authentication not working in .NET Core on Mac #46247
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
area-System.Net.Http |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionI Found that NTLM is not working correctly for .NET Core on Mac. To reproduce this I created a web page on Azure protected by NTLM and wrote some unit tests to validate the NTLM behavior. It is working correctly in all scenario's on .NET Core on Windows but for .NET Core on Mac it doesn't work correctly in a lot of scenario's: Test results
The tests can be found in this public github project: https://github.com/JeroenBer/testntlm ConfigurationRun the .NET Core NTLM tests on Windows 10 (x64) from Visual Studio 2019 and they will all Succeed. Other informationI did not try the tests on Linux but they might also fail there.
|
NTLM on macOS never worked AFAIK - see #887. It is interesting you report it working as well it is interesting to see change in 5. For 2.1 we used curl directly so the implementation come with it. |
Yes it certainly works on Mac .NET Core (2/3) if you add the following line:
The main reason for posting this because we liked to get this fixed in .NET Core since Xamarin is also going to be part of .NET Core 6. And NTLM is also a problem in Xamarin Android/iOS/Mac (see xamarin/xamarin-macios#7770), there is a workaround there using the old MonoWebRequestHandler but I think this should be solved in .NET Core so it will be fixed once and for all. Is there any way to get this on the roadmap for .NET Core to have proper NTLM support on all platforms ? |
Android/Xamarin solution is tracked separately in #32680 |
Description
I Found that NTLM is not working correctly for .NET Core on Mac. To reproduce this I created a web page on Azure protected by NTLM and wrote some unit tests to validate the NTLM behavior. It is working correctly in all scenario's on .NET Core on Windows but for .NET Core on Mac it doesn't work correctly in a lot of scenario's:
Test results
The tests can be found in this public github project: https://github.com/JeroenBer/testntlm
Configuration
Run the .NET Core NTLM tests on Windows 10 (x64) from Visual Studio 2019 and they will all Succeed.
Run the same .NET Core tests in Visual Studio on Mac and they will partly fail (or fully on .NET Core 5.0)
Other information
I did not try the tests on Linux but they might also fail there.
The text was updated successfully, but these errors were encountered: