When running an instance of a WEB API project that is not local to the CouchBase sever I get the following error:
{“No connection could be made because the target machine actively refused it 127.0.0.1:11210”}
I would expect that the IP address of the server that CouchBase is running on would be returned, this is causing the Web API to talk to its local system.
I am using the following web.config:
> <configSections>
> <sectionGroup name="couchbase">
> <section name="bucket" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase" />
> </sectionGroup>
> </configSections>
> <couchbase>
> <bucket>
> <servers bucket="tinman">
> <add uri="http://10.82.120.12:8091/pools" />
> </servers>
> </bucket>
> </couchbase>
And in the global.asa I have:
private static Cluster Cluster { get; set; }
public static IBucket Bucket;
protected void Application_Start()
{
Cluster = new Cluster();
Bucket = Cluster.OpenBucket("tinman");
GlobalConfiguration.Configure(WebApiConfig.Register);
}
protected void Application_End()
{
if (Bucket != null)
{
Bucket.Dispose();
}
if (Cluster != null)
{
Cluster.Dispose();
}
}
I install the CouchBase server using the IP of the host (10.82.120.12) instead of 127.0.0.1
When running the same Web API project locally on the CouchBase server the application works as expected. For some reason the proxy details are being passed as localhost.