Web Farm Framework and proxy servers: Part 2

In part 1, I focused on how to work around situations where your WFF controller has to pass through a proxy server in order to successfully retrieve the products feed. The configuration sample I provided didn’t address another possible scenario: What if that proxy server requires authentication?

This does add a little more work, primarily in the form of a small amount of code. To pass specific user credentials to the proxy in this scenario, you simply need to create a small assembly to handle the proxy communication and authentication for you, and reference that in your config file. Something similar to the solution here should suffice, just remember that the configuration this article mentions goes in the service config file (mentioned in my last post), not a web.config as mentioned here:

 

http://stackoverflow.com/questions/186800/is-it-possible-to-specify-proxy-credentials-in-your-web-config

 

One other thing I failed to note in part 1, if the primary and secondary servers in the farm also require proxy access to make HTTP calls, you’re going to have to use a similar workaround on those servers, otherwise you may still encounter the errors listed in the previous article since the farm servers pull the products feed down themselves. Using this workaround on the farm servers only requires a couple of small changes:

 

1. Instead of naming the config file WebFarmService.exe.config, as the last post instructed, name it WebFarmAgentService.exe.config to match the name of the agent service running on these boxes

 

2. Save this config file in C:\Program Files (x86)\IIS\Microsoft Web Farm Framework

 

Once all changes are made, be sure to restart the Web Farm Controller Service on the controller, and the Web Farm Agent Service on all farm servers to make sure those changes are picked up.

4 Comments

  • Part 2 - http://blogs.iis.net/deanc/archive/2011/04/28/web-farm-framework-and-proxy-servers-part-2.aspx

  • Hello, in WebFarmService.exe.config can I specify credentials for proxy access? (user/password)
    Regards, Marcelo.

  • Marcelo, yes you can, but it requires you to build an additional module that actually handles the proxy auth for you. The steps for doing so are in the link in the above article.
    Alternately, if you're running the latest version of WFF (the v2.1 service release), you don't have to bother with a WebFarmService.exe.config file, as full proxy support is included in the update. See my "part 3" article:
    blogs.iis.net/.../web-farm-framework-and-proxy-servers-part-3.aspx

  • Many thanks Dean!

Comments have been disabled for this content.