WCF gives an unsecured or incorrectly secured fault error

前端 未结 21 2559
予麋鹿
予麋鹿 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:49

    In my case, there are two problems that will throw this exception.

    Note that, my environment uses Single Sign On (or STS if you prefer) to authenticate a user through ASP.NET MVC site. MVC site in turn makes a service call to my service endpoint by passing bearer token which it requested from STS server with Bootstrap token previously. The error I got was when I made a service call from MVC site.

    1. The WCF service wasn't configured as a relying party in my SSO (or STS if you prefer).

    2. Service's configuration wasn't configured properly. Particularly on audienceUris node of system.identityModel. It must exactly match the service endpoint url.

      
          
              
                  
              
              ....
          
      
      

提交回复
热议问题