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(IDictionary`2 viewParams) +514
Couchbase.d__0`1.MoveNext() +91
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +163
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +578
System.Linq.Enumerable.ToList(IEnumerable`1 source) +78

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

1 Answer

« Back to question.

I solved it. The problem was DNS.