Odd error when stress testing against an AG We are running into an odd error when trying to stress test our application that hits an AG.  If we point the application directly to the primary server, we don't see any issues with the test.  However, if you point the application at the listener, we get this error:


  provider: TCP Provider, error: 0 - You were not connected because a
  duplicate name exists on the network. If joining a domain, go to
  System in Control Panel to change the computer name and try again. If
  joining a workgroup, choose another workgroup name.


Our connection string is similar to this:

&gt; connection string= "data source=DB_C_Name; MultiSubnetFailover=True;
&gt; initial catalog=DBName; integrated security=True;
&gt; MultipleActiveResultSets=True; App=EntityFramework;"


The DB_C_Name is an AD CName that points to the Listener, which in turn points to the WFC.

We have double checked and all of the WFC setting seem to be fine and we can't find any duplicate IPs on our network.

We are at a loss as to why this would happen when going through the listener but not going to the server directly.  We've also noticed this happening in a few other locations.
If we point the application directly to the primary server, we don't see any issues with the test.


Sounds like a problem with the name chosen for the Listener...


  error: 0 - You were not connected because a duplicate name exists on the network. If joining a domain, go to System in Control Panel to change the computer name and try again. If joining a workgroup, choose another workgroup name.


This tells me there is most likely a duplicate name in active directory which was added after this one. You'll need to check AD for the duplicate and find that server or item. It could be disabled, in an odd state, or could have already been removed. In AD, if another computer object is added with the same name (successfully) then it will overwrite the SID in the AD database with the new computer object and giving you this error for the old one. When the new one is removed, renamed, or deleted, nothing happens to the old one so it'd need to be re-added. In this case, the listener re-created though I'd expect the creation to error out...


  We have double checked and all of the WFC setting seem to be fine and we can't find any duplicate IPs on our network.


Right, the error is specifically talking about the NAME, not IP.