Bonjour
Comment faire passer le token Autorization dans la httpRequest du web service (qqui est une webreference)
merci à vous de votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Secure.ServiceDomaineBeanSecureService s = new Secure.ServiceDomaineBeanSecureService(); CredentialCache cache = new CredentialCache(); NetworkCredential n=new NetworkCredential("utilisateur1","utilisateur1"); cache.Add(new Uri(s.Url),"Negotiate",n); s.Credentials=cache; //s.Credentials=n; textBox1.Text = s.createDeal("BHS.Secure " + DateTime.Today).ToString();
HTTP REQUEST
POST /ServiceDomaineBeanSecure/ServiceDomaineBeanSecureService
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.832)
VsDebuggerCausalityData: uIDPo5JkRZ3I1gFLuHO43zI7GnQAAAAAp1/8+qGDtkWf6Wnl5p0ZSM4+Bq7RIaRJobKrqUlAmPcACAAA
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: 172.17.1.43:7001
Content-Length: 356
Expect: 100-continue
Connection: Keep-Alive
*** ici je veux Authorization: Basic dXRpbGlzYXRldXIxOnV0aWxpc2F0ZXVyMQ==
Partager