There is a web service wsdl. I try to create a client to work with this web service, but at the stage of using the method it gives an authorization error (apparently).
ystem.ServiceModel.Security.MessageSecurityException" в mscorlib.dll Дополнительные сведения: Запрос HTTP не разрешен для схемы аутентификации клиента "Anonymous". От сервера получен заголовок аутентификации "Digest realm="http://bankrot.fedresurs.ru/MessageService/WebService.svc", nonce="WeV4+tuehEuzjB/KyZ8SFg==", opaque="ElC4Gn57aEW50veVtLfagA==", stale=false, algorithm="MD5", qop="auth"". I have an example for writing a program:
client.ClientCredentials.HttpDigest.ClientCredential.UserName = Properties.Settings.Default.Login; client.ClientCredentials.HttpDigest.ClientCredential.Password = Properties.Settings.Default.Password; client.ClientCredentials.HttpDigest.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation; I tried to enter the password directly with the login, but when accessing the method, the service gives an exception.
MessageServiceClient client = new MessageServiceClient(); client.ClientCredentials.HttpDigest.ClientCredential.UserName = "Login"; client.ClientCredentials.HttpDigest.ClientCredential.Password = "Pass"; client.ClientCredentials.HttpDigest.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation; client.Open(); Why is this error issued? (