WCF gives an unsecured or incorrectly secured fault error

前端 未结 21 2527
予麋鹿
予麋鹿 2020-11-28 23:09

I am trying to consume a remote svc web service. I created the proxy class using svcutil.exe, and after that I\'ve added that class to my console application, b

21条回答
  •  日久生厌
    2020-11-28 23:36

    I had to change the SecurityMode to Message (WSHttpBinding), before it worked. i.e.

    _wcf = new ServiceRequestClient(new WSHttpBinding(SecurityMode.Message),                     
           new EndpointAddress(_wcfRequestServerAddress));
    

提交回复
热议问题