An error occurred when verifying security for the message

前端 未结 8 1247
半阙折子戏
半阙折子戏 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:22

    I had a similar issue. I was building my datetime formatted strings using my local time, but my service/server was expecting GMT.

    I needed to get the GMT time (JAVA):

    final Date currentTime = new Date();    
    final SimpleDateFormat sdf = 
    new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.000Z'");
    sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
    System.out.println(sdf.format(currentTime));
    

提交回复
热议问题