我有一个非常简单的 WCF 服务,我想公开它。我创建了服务并将其设置在我们的服务器上,没有太多麻烦。问题是我们可以从我们的私有网络中使用该服务,但是当我们尝试从网络外部使用它时,会抛出以下错误:
安全支持提供程序接口 (SSPI) 协商失败。
我做了一些研究,听起来 WCF 默认使用 Windows 身份验证。我想将其更改为不使用身份验证,但我不完全确定如何。这是我的配置现在的样子。
<system.serviceModel>
<services>
<service behaviorConfiguration="XX.ZZ.WebService.MyServiceBehavior"
name="XX.ZZ.WebService.MyService">
<endpoint address="" binding="wsHttpBinding" contract="XX.ZZ.WebService.IMyService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="XX.ZZ.WebService.MyServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
我将不胜感激一些指示,或朝着正确的方向轻推。