WCF gets Access denied when the consumer try invoke a WCF service calls hosted on Virtual Machine

前端 未结 2 1172
伪装坚强ぢ
伪装坚强ぢ 2021-01-20 07:32

Problem

System.ServiceModel.Security.SecurityAccessDeniedException : Access is denied.

Relevant Stack lines (r

相关标签:
2条回答
  • 2021-01-20 07:51

    Start by enabling WCF tracing on the server. The trace log may contain a meaningful error message. Enable message logging and see if there any obvious differences between the messages that are accepted and those that are not. Although, honestly, I don't see how this can happen in your case.

    0 讨论(0)
  • 2021-01-20 08:03

    This is a System.ServiceModel.Security exception so it is probably not a firewall or IIS problem.

    Try removing the following code from the client:

      <clientCredentials> 
        <serviceCertificate> 
          <authentication certificateValidationMode="None" /> 
        </serviceCertificate> 
      </clientCredentials> 
    

    And the following code from the server:

      <serviceCredentials>  
        <serviceCertificate  
                    findValue="homologCertificate"  
                    storeLocation="LocalMachine"  
                    x509FindType="FindBySubjectName"  
                    storeName="My"/>  
      </serviceCredentials>  
    
    0 讨论(0)
提交回复
热议问题