BizTalk WCF Service Consuming Wizard – HTTP 407 Proxy Authentication Required
I got this error recently running the BizTalk WCF Consuming Wizard whilst working at a customers office when I didn’t previously (sensitive parts of the error message have been removed):
I think it was due to installation of internet security software on my development VM by the company’s infrastructure team and/or a new set of group policies being applied to the domain in which my VM is connected too…
Anyhow, it was obvious that all traffic from my VM was now going through a web proxy for the purposes of filtering traffic and I needed to install proxy client software. This would entail some internal processes being enacted.
Being impatient to progress (and seeing this as an opportunity to try something out that I had read about a few weeks previously) I decided to see if a I could use SvcUtil.exe, providing my proxy credentials so enabling the SvcUtil.exe to authenticate against the web proxy for me.
It would be great if the BizTalk WCF Service Consuming Wizard had proxy authentication support! Maybe I’m missing a trick here??
Based on this article here on Stack Overflow, I created a small proxy class, created a strong name key file for it and then installed it in the GAC on my dev VM:
I then edited my SvcUtil config file as follows, adding a reference to the proxy class assembly:
Then using the simple batch script below, I could run SvcUtil with proxy authentication included and hey presto, I could download the WSDL and associated XSD import files!
This saved me the annoyance of having to download each imported XSD file individually and then modifying the path in the parent WSDL.
I have a GitHub repo here containing the source code for the solution (as usual, provided under the terms of the MIT licence).