Runtime: NTLM not working on Linux

Created on 3 Jun 2019  路  16Comments  路  Source: dotnet/runtime

@davidsh , I create one .net core 2.1 project and can run will in my local windows OS. But when i follow the AWS toolkit for VS tool to push that in AWS lambda it will throw GSSAPI issue. I check this is regarding NTLM auth does not work by default on Unix issue, I setup Ubuntu 16.04 VM local and run apt-get -y install gss-ntlmssp, also add AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false) in the dotnet code, finally i got 401 error in ubuntu, do u have any idea how to resolve that ?
Before install gss-ntlmssp and add AppContext.SetSwitch
image
After install gss-ntlmssp and add AppContext.SetSwitch
image
image

_Originally posted by @stevenruizhang in https://github.com/dotnet/corefx/issues/28961#issuecomment-498299281_

area-System.Net.Http needs more info

All 16 comments

@davidsh , I create one .net core 2.1 project and can run will in my local windows OS.

The NTLM bug you reference in dotnet/runtime#25827 was fixed in .NET Core 3.0. It is not fixed in .NET Core 2.1.

Please try out .NET Core 3.0 latest Preview:
https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0-preview-5/

If you are still having problems, please update this issue and include the code sample that you are using. From the screenshot above, it appears you are using WebRequest. But it is not clear how you are setting up credentials for your application.

Also, do not use this code in your application:

c# AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false)

It will not help. The NTLM fixes require the new SocketsHttpHandler. So, you shouldn't be turning it off with that app context switch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omariom picture omariom  路  3Comments

bencz picture bencz  路  3Comments

omajid picture omajid  路  3Comments

jkotas picture jkotas  路  3Comments

jzabroski picture jzabroski  路  3Comments