Question

I want to run the svcutil.exe tool to access a web service on the internet. Unfortunately, whenever I try, I get a bunch of errors that include the following message:

The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.

As I have learned from this related post (with more details here), the problem is that I am sitting behind an authenticating proxy. That post explains that I need to edit the app.config file, but I can't figure out how to do that. I think I will use the /svcutilConfig:alternate_app.config switch, but I don't know how to construct a valid .config file to pass to that switch. What is the default app.config file that svcutil.exe uses?

Was it helpful?

Solution

Well, I think I have figured out the answer to my question:

It turns out that the default .config file used by svcutil.exe is called svcutil.exe.config, and (at least for me) it lives in this folder:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin

I decided to just edit that file directly (rather than fumble around with the /svcutilConfig switch). I needed Admin privileges to do so.

The final contents of that file looked like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <generatePublisherEvidence enabled="false" />
  </runtime>
  <system.net> 
    <defaultProxy useDefaultCredentials="true" /> 
  </system.net>
</configuration>

(with the secret sauce buried in the <system.net> element.)

In order for this all to work, I had to start the Command Prompt as Administrator, navigate to the folder listed above, and run the svcutil.exe command from there.

Hope this helps some other poor soul who gets stuck in this mess! Thanks to @AndrewWebb for the clues that got me going!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top