-
Notifications
You must be signed in to change notification settings - Fork 565
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
Connection that works with netcoreapp3.1 fails with net5.0 #4597
Comments
Solved. I have found the root problem and it has little to do with WCF at it primarily caused by a change in how the The following lines were added between 3.1 and 5.0
which means that the computed SPN now includes the port of the URI if it its not the default port. Unfortunately the service I'm calling was registered without its (non-standard) port. Arguably including the port is the correct behavior as indicated by this article. Currently there is no way to directly specify the SPN to use for authentication. It has been requested in dotnet/runtime#25320, but the issue does not seem to have gained much traction. As a workaround I'have implemented a custom |
@penenkel Hi! |
Hi, @abakumov-v , happy to help. Here is the implementation of
And then apply it where you create your WCF-client with Be aware that this sets the Please also consider upvoting the feature request to make the SPN configurable on |
Interesting, apparently the dotnet team is trying to mitigate the problem by making it configurable via an AppContext switch or an environment variable: dotnet/runtime#57159 The pull request ist marked with the 6.0 milestone, so if you are planning to to switch to NET 6.0 anytime soon you might want to consider that approach. I'm not quite sure if this would work in my scenario as ist is obviously an application wide switch and would thus apply to all http communications not just one endpoint. |
Hello, me and my colleges have run into the following puzzling problem.
We have a WCF client application that communicates with a third party WCF server. We are using a
BasicHttpBinding
withBasicHttpSecurityMode.Transport
andHttpClientCredentialType.Windows
to establish the binding. Everything works as expected if the TFM isnetcoreapp3.1
, but as soon as we try to switch tonet5.0
each connection fails withThe version of
System.ServiceModel.Http
does not seem to matter. We tried it with both 4.7 and 4.8.1.As far as I can tell the above error simply indicates a 401 status response. As such I am not certain if this is really a problem with WCF or a problem with the underlying runtime.
The text was updated successfully, but these errors were encountered: