Operation is not valid due to the current state of the object. When publishing to windows server

I have an application using the .net client. It works fine in VS and on my local machine in IIS 7. However when I publish the app on Windows 2012 IIS8, I get this exception.

[InvalidOperationException: Operation is not valid due to the current state of the object.]
Couchbase.CouchbaseViewHandler.GetResponse(IDictionary2 viewParams) +514 Couchbase.<TransformResults>d__01.MoveNext() +91
System.Linq.WhereSelectEnumerableIterator2.MoveNext() +163 System.Collections.Generic.List1…ctor(IEnumerable1 collection) +578 System.Linq.Enumerable.ToList(IEnumerable1 source) +78

The only time I can recreate this on my local machine is if I try to build the couchbase configure programmaticly.

I solved it. The problem was DNS.