-
Notifications
You must be signed in to change notification settings - Fork 561
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
NullReferenceException when using proxy server with NTLM authentication and BasicHttpBinding (... and potentially others) #4557
Comments
Hope this patch helps (i've tested on my local machine behind corporate proxy with Basic authentication): This lightweigt patch enables to clients to provide fully specified WebProxy as required to their environment. It's very critical bug and stops any WCF usage in typical Enterprise environment. Thanx in advance.
|
|
@dimalyshev, can you provide the call stack? |
@mconnew, sorry in advance for mess with this 2 prev PR - I really don't know how to purge these artifacts from The exception call stack for #4562 is here:
|
Is it an option to manually pass Proxy Authentication header on the Transport level via custom implementation of the IClientMessageInspector in the meantime? |
@ButaevSergey , the main idea of fix is to do initing _proxy used in HttpChannelFactory.GetHttpClientAsync more clear and client driven - not framework driven, because as stated in #4562 even Basic auth for proxy doesn't work Meanwhile all previous mechanics of interception and configuring transport level are kept the same. |
When using BasicHttpBinding (or potentially others) behind a web proxy that requires authentication, the authenticationScheme cannot be used, as when it comes to opening the http channel, a NullReferenceException is raised in System.Private.ServiceModel.dll when trying to use an uninialized class member.
Root cause: the credential manager only gets instantiated when using authentication against the service itsself but the proxy authentication, which actually can be different (and is in most cases in large enterprise scenarios) is being ignored, even if passed by the used binding.
Code to reproduce:
The text was updated successfully, but these errors were encountered: