I am using Visual Studio 2012 to publish a web site to an IIS server farm. The problem I ran into is that the publishing process would only work if it happened to get routed to the primary server.

My solution was to temporarily stop the secondary server so that the publishing request would have to go to the primary server. This is, obviously, not an ideal solution. Is there a way I can force the publishing request to go to the primary server? Or is there a better way to deal with this problem?

  • How are you synchronizing files across your web farm?
    – MDMarra
    Jan 13, 2014 at 16:23
  • @MDMarra - I believe they are automatically copied from the primary to the secondary.
    – Ferruccio
    Jan 13, 2014 at 16:25
  • How, though? DFS? A script? Clustered storage? You need to understand what is doing the file synchronization between the two and how it is configured before you solve this problem.
    – MDMarra
    Jan 13, 2014 at 16:27
  • @MDMarra - DFS.
    – Ferruccio
    Jan 13, 2014 at 16:28
  • Can you post a screenshot of your DFS replication topology from the DFS Management console?
    – MDMarra
    Jan 13, 2014 at 16:35

1 Answer 1


If you are using DFS Replication, as you've indicated in the comments, then you don't have a mesh replication topology configured, you have a hub and spoke with your "primary" server being the hub and all of your other web servers being the spokes with one-way replication configured from hub to spoke. The easiest way to resolve this issue is to make the replication bi-directional mesh (or at the very least a bi-directional hub-and-spoke) so that it doesn't matter which server you make a change on. A mesh topology is more fault tolerant than a hub and spoke at 3 or more servers.

The other alternative is to configure Visual Studio to connect directly to the "primary" server, instead of using the web farm name. The web farm name is likely a virtual name on a load-balancer or a round-robin DNS name. Take that out of the equation and connect directly to whichever server you've designated as the "primary" in the farm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.