首页 文章

无法对本地网络上的RavenDB服务器进行身份验证

提问于
浏览
2

我正在尝试从 Server1 连接到 Server2 上的RavenDB .

Server2 上,我创建了一个新用户"RavenDBUser",并授予他们对RavenDB安装中的Database目录的读/写访问权限 .

我在端口8080上运行RavenDB作为Windows服务 .

Server1 我已将我的应用程序的连接字符串设置为:

Url=http://server2:8080;Database=MyDatabase;Domain=server2;user=RavenDBUser;password=mypassword;

当我运行我的应用程序时,我收到403,禁止错误 .

但是,我可以从 Server1 连接到RavenDB Studio,并在验证为"RavenDBUser"后查看"MyDatabase" .

错误详情如下:

[WebException:远程服务器返回错误:(403)Forbidden . ] System.Net.HttpWebRequest.GetResponse()8522396 Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func1 getResponse)805 Raven.Client.Connection.HttpJsonRequest.ReadResponseJson ()587 Raven.Client.Connection.ServerClient.DirectPutIndex(String name,String operationUrl,Boolean overwrite,IndexDefinition definition)774 Raven.Client.Connection . <> c__DisplayClass50 . <PutIndex> b__4f(String operationUrl)36 Raven.Client.Connection .ReplicationInformer.TryOperation(Func2操作,String operationUrl,Boolean avoidThrowing,T&result)194 Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication(String方法,String primaryUrl,Int32 currentRequest,Int32 currentReadStripingBase,Func2操作)526 Raven.Client.Connection . ServerClient.ExecuteWithReplication(String方法,Func2操作)138 Raven.Client.Indexes.AbstractIndexCreationTask.Execute(IDatabaseCommands databaseCommands,DocumentConve ntion documentConvention)86 Raven.Client.Indexes.IndexCreation.CreateIndexes(ExportProvider catalogToGetnIndexingTasksFrom,IDatabaseCommands databaseCommands,DocumentConvention convention)108 MyApp.CMSRegistry.InitializeStore()380 MyApp.CMSRegistry..ctor()66

1 回答

  • 1

    似乎缺少的是你必须在RavenDB系统数据库配置中明确启用windows用户/组 .

    这样做的不那么容易找到的文档可以在http://ravendb.net/docs/studio/multi-database找到页面的3/4左右 .

相关问题