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 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.
Gustavo Frason Posted March 31, 2024 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 Report Posted March 31, 2024 Boa noite, conseguiu de alguma forma?
Fórum RM Posted November 3, 2024 Topic Count: 51 Topics Per Day: 0.01 Content Count: 364 Content Per Day: 0.06 Reputation: 13 Achievement Points: 2,232 Solved Content: 0 Days Won: 5 Status: Offline Age: 19 Report Posted November 3, 2024 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)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now