Jump to content
Seja Membro VIP - Remova Banners de Propagandas, Tenha Liberado Qualquer Download, Além de Acessos em Áreas Exclusivas!! ×

brrenatolima

Membros
  • Posts

    1
  • Joined

  • Last visited

About brrenatolima

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

brrenatolima's Achievements

Newbie

Newbie (1/10)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Boa tarde a todos. Usando o Visual Studio 2019, estou fazendo um projeto em MVC 6 onde preciso consumir um WebService do TOTVS RM, porém sempre que tento fazer a autenticação ou utilizar qualquer método, o sistema me retorna com a mensagem: MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was '*'. Abaixo meu código em .Net: BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly); binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; var endPoint = new EndpointAddress("http://XXXXXXXX:8051/wsConsultaSQL/IwsBase"); var cliente = new IwsBaseClient(binding, endPoint); cliente.ClientCredentials.Windows.ClientCredential.UserName = codUsuario; cliente.ClientCredentials.Windows.ClientCredential.Password = senha; cliente.ClientCredentials.UserName.UserName = codUsuario; cliente.ClientCredentials.UserName.Password = senha; cliente.ChannelFactory.Open(new TimeSpan(5, 59, 59)); await cliente.AutenticaAcessoAsync(); Desde já agradeço.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.