访问WCF服务时触发MaxClockSkew

访问WCF服务时触发MaxClockSkew

问题描述:

我有一个WCF服务,该服务的一个端点的MaxClockSkew配置设置为23:59:59,但是没有安全行为,而另一个端点具有相同的MaxClockSkew配置和安全配置。问题是访问非安全端点时不会引发异常,而访问安全端点时会引发安全异常。我希望两个端点都将引发异常,该怎么办?

I have a WCF service which has one end point with configuration of a MaxClockSkew set to 23:59:59 but with no security behavior, and another end point with the same configuration of MaxClockSkew and security configuration. The problem is when accessing the non secure endpoint no exception is thrown and when accessing the secure endpoint a security exception is thrown. I would like that both of the endpoints will throw exceptions, how can it be done?

谢谢。

Aryeh

安全模式-security mode = Transport-消息中不包含导致MaxClockSkew验证的时间戳忽略该消息并且不引发安全异常。将安全模式更改为security mode = TransportWithMessageCredential,其中包括时间戳,并允许MaxClockSkew验证来测试消息的时间增量。

The security mode - security mode="Transport" - does not include time stamp in the message which cause the MaxClockSkew validation to ignore the message and not throws a security exception. Change the security mode to security mode="TransportWithMessageCredential" which include time stamps and allow the MaxClockSkew validation to test the message for time delta.