brrenatolima Posted October 21, 2019 Topic Count: 1 Topics Per Day: 0.00 Content Count: 1 Content Per Day: 0.00 Reputation: 0 Achievement Points: 15 Solved Content: 0 Days Won: 0 Status: Offline Device: Windows Report Posted October 21, 2019 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. Quote
Gustavo Frason Posted March 31 Topic Count: 3 Topics Per Day: 0.00 Content Count: 7 Content Per Day: 0.00 Reputation: 1 Achievement Points: 62 Solved Content: 0 Days Won: 0 Status: Offline Device: iPhone Report Posted March 31 Boa noite, conseguiu de alguma forma? Quote
Fórum RM Posted November 3 Topic Count: 47 Topics Per Day: 0.01 Content Count: 353 Content Per Day: 0.06 Reputation: 8 Achievement Points: 2,152 Solved Content: 0 Days Won: 4 Status: Offline Age: 18 Report Posted November 3 Seu tópico foi movido para outra área no ForumRM Mudamos o mesmo de: Sistemas RM > [RM] Manuais Tutoriais e Roteiros Para o fórum: Sistemas RM > [RM] Framework (FV, MD, Conceitos, entre outros) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.