An error occurred when verifying security for the message

前端 未结 8 1240
半阙折子戏
半阙折子戏 2020-12-05 18:03

When I try to call a WCF service I am getting the following message \"An error occurred when verifying security for the message.\"

When I remove the custom authenica

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 18:29

    I was getting this same error message and it turned out to be due to a time difference between my workstation machine and the server hosting the WCF service. The server was about 10 minutes behind my machine and WCF security doesn't seem to like that very much.

    To find the root problem I turned on serviceSecurityAuditing in the server's config file. Add the following to the configuration/system.serviceModel/behaviors/serviceBehaviors/behavior section for your service:

    
    

    The following site was helpful in figuring this out:

    http://blogs.microsoft.co.il/blogs/urig/archive/2011/01/23/wcf-quot-an-error-occurred-when-verifying-security-for-the-message-quot-and-service-security-audit.aspx

提交回复
热议问题