How to make WCF service server-client time difference independent?

后端 未结 2 794
感动是毒
感动是毒 2021-01-02 16:17

While accessing WCF service from a test client, I am getting following exception:

System.ServiceModel.Security.MessageSecurityException: An unsecured or inco         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-02 16:23

    There can be multiple reasons for this error, the common one is related to server not authenticating client for variosu reasons (maybe not on the same domain). To determine the exact reasons turn on wcf trace and see what errors it shows in red. What you're looking for is the inenr exception which is a little hidden in the trace UI, it is in the right side in the middle down the tree.

    Here is how to set a clock skew:

    
               
               
               
                  
                  
               
    
    

    Note skew can only be defined on a custom binding. Since you use WSHttpBinding you need to convert it to a custom binding which can be easily be done online via WCF binding converter.

提交回复
热议问题