This question related to this post Authorizat开发者_如何学运维ion Header is missing in Http request using WCF.
Is there way to explicity add authorization header into Http Request when making WCF call?
I am putting the same answer for this questions too that I put in the another question Authorization Header is missing in Http request using WCF. Because they are related. Actually, I was wrong about this question. I did see different behaviour when running HTTP analyzer. While Http anaylzer running, my application crashed after receiving 401 response. When Http analyzer application closed, the above code worked as expected. Since code worked as expected, authorization header was added by WCF.
精彩评论