WCF error: The caller was not authenticated by the service

前端 未结 10 521
野性不改
野性不改 2020-12-01 03:53

I am trying to access my WCF service on a server from my client console application for testing. I am getting the following error:

The caller was no

10条回答
  •  悲&欢浪女
    2020-12-01 04:08

    if needed to specify domain(which authecticates username and password that client uses) in webconfig you can put this in system.serviceModel services service section:

              
    
    
    

    and in client specify domain and username and password:

     client.ClientCredentials.Windows.ClientCredential.Domain = "example.com";
     client.ClientCredentials.Windows.ClientCredential.UserName = "UserName ";
     client.ClientCredentials.Windows.ClientCredential.Password = "Password";
    

提交回复
热议问题