WCF 'A Call to SSPI Failed, see inner exception'
Question
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?
Solution
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!
OTHER TIPS
i removed identity element from config for local testing when i was not connected to domain. It works.
reference -
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
Check for framework installed, framework 4.5.x should be used. It might be upgraded. Restore old version and it will work.