I built a WCF Service that uses custom username and password authentication and I am testing it from the client app with the following code:
using (ServiceReferenceClient.TestServiceClient tc = new ServiceReferenceClient.TestServiceClient())
{
tc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
tc.ClientCredentials.UserName.UserName = "User1";
tc.ClientCredentials.UserName.Password = "Pwd1";
tc.ServiceMethod(param1, param2, param3);
}
It works fine but I need to see the actual SOAP request sent to the WCF service and response. How can I do that from my client?
I know I might have to write my own custom message inspector and would like some pointers on how to build one
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…