WCF 'A Call to SSPI Failed, see inner exception'
Solution 1
Thanks tomasr, it was a misconfigured SPN.
Too bad there's no functionality on this site to close your own question, I'll have to wait 2 days to choose this one :-)
Thanks again!
Solution 2
i removed identity element from config for local testing when i was not connected to domain. It works.
reference -
Solution 3
under the <system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcp">
<security mode="None">
</binding>
</netTcpBinding>
</bindings>
add this to bindingConfiguration in the endpoint
ref: https://www.youtube.com/watch?v=KYDBjoCYAC4&list=PL6n9fhu94yhVxEyaRMaMN_-qnDdNVGsL1&index=53
Joel Coehoorn
2009-2013 Microsoft ASP.Net MVP It's pronounced: koo-horn. The avatar is both because I play counter strike and a nod to lambda expressions in C#. Twitter: @jcoehoorn
Updated on February 03, 2020Comments
-
Joel Coehoorn over 4 years
I had a self-hosted win service WCF installed and running at one point.
Naturally, I had to make some changes. So I changed the base address back to my local workstation and made the changes. It worked fine.
Now it's time to redistribute and... Well... It keeps hosing and I can't figure it out.
From the app.config file:
<system.serviceModel> <services> <service behaviorConfiguration="ExStreamWCF.Service1Behavior" name="ExStreamWCF.Service1"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="" contract="ExStreamWCF.IService1"> <identity> <dns value="Devexstream-2" /> <!--<dns value="vmwin2k3sta-tn2" />--> </identity> </endpoint> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://Devexstream-2:8080/Service" /> <!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />--> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ExStreamWCF.Service1Behavior"> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors>
From the web.config file (long story):
<system.serviceModel> <services> <service behaviorConfiguration="ExStreamWCF.Service1Behavior" name="ExStreamWCF.Service1"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="" contract="ExStreamWCF.IService1"> <identity> <dns value="Devexstream-2" /> <!--<dns value="vmwin2k3sta-tn2" />--> </identity> </endpoint> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://Devexstream-2:8080/Service" /> <!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />--> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ExStreamWCF.Service1Behavior"> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors>
Any guesses on what I'm doing wrong?
-
Forgotten Semicolon almost 13 yearsWhat does the inner exception say?
-
Admin almost 13 yearsI honestly don't know how to find out what the inner exception says!
-
tomasr almost 13 yearsEnabled WCF tracing on the service (msdn.microsoft.com/en-us/library/ms733025.aspx), it will likely give you all the necessary information. If you're on a domain, I'd assume it's something causing kerberos to fail (like a missing or misconfigured SPN, or the base address using a hostname that doesn't match the SPN configured or is not known to the domain controllers).
-
-
Jamal Ashraf over 12 yearsin my case it was caused by the endpoint using a server address in upper case, changing to lower case resolved this immediately
-
THEIVA Uthayathas over 5 yearsadd this to bindingConfiguration in the endpoint <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="netTcp" contract="IMetadataExchange" />
-
Muhammad Dyas Yaskur over 4 yearsI think your post looks like a comment rather than an answer.