【问题标题】:Unable to authenticate to RavenDB server on local network无法对本地网络上的 RavenDB 服务器进行身份验证
【发布时间】:2013-01-10 07:23:16
【问题描述】:

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

Server2 上,我创建了一个新用户“RavenDBUser”,并授予他们对 RavenDB 安装中数据库目录的读/写访问权限。

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

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

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

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

但是,我能够从 Server1 连接到 RavenDB Studio,并在以“RavenDBUser”身份验证后查看“MyDatabase”。

错误详情如下:

[WebException:远程服务器返回错误:(403)禁止。] 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(Func
2 操作,字符串 operationUrl,布尔避免投掷,T& 结果)+194 Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication(字符串 方法,字符串 primaryUrl,Int32 currentRequest,Int32 currentReadStripingBase, Func2 operation) +526
Raven.Client.Connection.ServerClient.ExecuteWithReplication(String method, Func
2 操作)+138
Raven.Client.Indexes.AbstractIndexCreationTask.Execute(IDatabaseCommands databaseCommands, DocumentConvention documentConvention) +86
Raven.Client.Indexes.IndexCreation.CreateIndexes(ExportProvider catalogToGetnIndexingTasksFrom, IDatabaseCommands databaseCommands, DocumentConvention 约定)+108
MyApp.CMSRegistry.InitializeStore() +380 MyApp.CMSRegistry..ctor() +66

【问题讨论】:

  • 那么确认一下,可以通过浏览器访问吗?
  • 是的。系统提示我进行身份验证,并且可以成功以“Server2\RavenDBUser”用户帐户身份进行身份验证。

标签: ravendb


【解决方案1】:

似乎缺少的部分是您必须在 RavenDB 系统数据库配置中显式启用 Windows 用户/组。

可以在页面下方约 3/4 处的http://ravendb.net/docs/studio/multi-database 找到不太容易找到的文档。

【讨论】:

    猜你喜欢
    • 2011-07-26
    • 1970-01-01
    • 1970-01-01
    • 2020-11-08
    • 2014-11-08
    • 2021-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多