2013-03-26 80 views
0

我想安裝NServiceBus 3.3.5使用中心化的RavenDB,而不是在每個應用程序服務器上運行RavenDB。我能夠使用NServiceBus.Persistence與Windows用戶名/密碼,它的工作原理。但是,如果可能的話,我想使用API​​Keys。NServiceBus與RavenDB api-keys

作品:

<add name="NServiceBus.Persistence" 
    connectionString="Url=http://DBServerName:8080;Database=DBName;User=Domain\RavenDBTestUser;Password=**********;" /> 

不起作用:

<add name="NServiceBus.Persistence" 
    connectionString="Url = http://DBServerName:8080/; ApiKey = NServiceBusClients/SecretKey; Database = DBName" /> 

我得到以下錯誤(RavenDB返回403)啓動服務時...

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 

的用戶Domain \ RavenDBTestUser和api-key在RavenDB中具有相同的訪問權限。我已經通過thisthis,但那些是從去年年中和大約版本3.2.3。它在3.3.5中仍然是一樣的還是我做錯了什麼?

P.S.連接字符串是從Raven Studio複製粘貼的,因此不存在拼寫錯誤。

回答

2

NServiceBus v3.3.5仍然使用RavenDb V1,不幸的是我無法找到關於烏鴉V1使用API​​Keys的多DOCO,我發現的唯一的事情是http://ravendb.net/docs/1.0/server/bundles/authentication

,你需要「上述國鏈接身份驗證捆綁「,你有這個安裝?

另一方面,NServiceBus v4使用RavenDB v2,並從閱讀this page,它應該很容易設置它。 NServiceBus v4測試版剛剛發佈,請參閱http://nservicebus.com/

+0

我打算升級到4.0版本,但我不確定它是否無法正常工作,因爲我沒有正確設置或者因爲它不能正常工作。這些鏈接非常清楚,它不應該與3.2.3一起使用。我會在接下來的幾天內嘗試4.0。感謝你的回答。如果其他人可以通過任何方式確認,我會將其打開。 – 2013-03-26 03:59:01