I am trying to setup NServiceBus 3.3.5 to use centerlized RavenDB instead of running RavenDB on every application server. I am able to use NServiceBus.Persistence with Windows username/password and it works. However, I would like to use APIKeys if possible.
Works:
<add name="NServiceBus.Persistence"
connectionString="Url=http://DBServerName:8080;Database=DBName;User=Domain\RavenDBTestUser;Password=**********;" />
Doesn't work:
<add name="NServiceBus.Persistence"
connectionString="Url = http://DBServerName:8080/; ApiKey = NServiceBusClients/SecretKey; Database = DBName" />
I get the following error (RavenDB returns 403) when starting the service ...
FATAL 06:32:23 Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Raven.Client.IDocumentStore)' on type 'RavenTimeoutPersistence'. ---> System.InvalidOperationException ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getResponse) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 279
The user Domain\RavenDBTestUser and api-key have identical access in RavenDB. I have gone thru this and this but those are from mid-last year and about version 3.2.3. Is it still the same in 3.3.5 or am I doing something wrong?
P.S. The connection string is copied-pasted from Raven Studio so there is no typo in it.