- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我在我的开发机器上运行 WCF 服务时,只要客户端连接到域,它就可以工作。
当机器断开连接时,出现以下异常:
System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception. System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you
该服务在内部使用安全性 (<transport clientCredentialType="Windows" protectionLevel="None"/>
),因此我无法轻易将其关闭。
有没有办法解决这个问题,以便我可以在未连接时测试服务?
最佳答案
未连接到域时可能无法工作。
多个绑定(bind)的默认 WCF 安全性是“Windows”,例如您当前的用户凭据将传递给 WCF 服务,然后该服务会尝试针对 Windows 域验证这些用户凭据。
如果您未连接,则无法进行验证,因此 WCF 服务将拒绝调用。按设计工作,我会说:-)
也许您可以为不需要 Windows 身份验证的服务公开第二个端点(“本地开发测试”)?离开域时,只需连接到该非安全端点,这样您至少可以测试服务及其内部工作。
关于.net - 断开连接的域客户端上的 SecurityNegotiationException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2377589/
我正在使用 WCF 在我的服务器上运行一个简单的服务;该服务托管在 WebDev.WebServer.exe(本地)中。 当我调用本地服务时,出现以下异常: Unhandled Exception:
当我在我的开发机器上运行 WCF 服务时,只要客户端连接到域,它就可以工作。 当机器断开连接时,出现以下异常: System.ServiceModel.Security.SecurityNegotia
我从 WCF 开始,我正在关注 the samples from MSDN .我设法在一台机器上运行入门示例,并在不同的机器上部署客户端和服务并远程访问该服务。 我的目标是实现 Publish/Sub
我使用 Pluralsight Selfcert 创建证书。当我在 wcf 服务中使用它时,它会出现 SecurityNegotiation 异常。我搜索它并找到了解决方案。我将 certificat
我试图让 WCF 网络服务在高延迟/低带宽网络上运行,但事情没有按计划运行。WCF 服务在 Windows 服务中自托管,实现了这个接口(interface): [OperationContract(
尝试连接到 CRM 2011 Web 服务时出现意外错误。这是背景: 连接字符串(已删除敏感信息):"ServiceUri=https://crmdomain.com/OrgName/XRMServi
我在尝试通过 UAT 环境调用网络服务时出现以下错误。但是在我的本地它工作正常。我看到一些评论,因为它可能是由于虚拟证书引起的,但无法得到答案,因此将其张贴在这里。我也是 WCF 的初学者。请让我知道
我是一名优秀的程序员,十分优秀!