在IISExpress上运行RavenDB时无法创建数据库 [英] Unable to create databases when running RavenDB on IISExpress

查看:143
本文介绍了在IISExpress上运行RavenDB时无法创建数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题所述. (来自邮件列表的交叉帖子: https://groups.google.com/forum /#!topic/ravendb/hxP3REWVMdg )

As the title says. (Cross post from the mailing list: https://groups.google.com/forum/#!topic/ravendb/hxP3REWVMdg)

iisexpress进程正在以当前登录的用户身份运行,但是在尝试创建数据库时,我仅收到未经授权的错误消息.

The iisexpress process is running as the currently logged in user, but I'm only getting Unauthorized error messages when trying to create databases.

访问/debug/user-info仅给出以下消息: {备注":正在使用匿名用户","AnonymousAreAdmins":false}

Accessing /debug/user-info only gives the following message: {"Remark":"Using anonymous user","AnonymousAreAdmins":false}

推荐答案

由Fitzchak Yitzchaki提供,我在RavenDB邮件列表中得到了答案:
https://groups.google.com/forum/?fromgroups=# !topic/ravendb/hxP3REWVMdg

Courtesy of Fitzchak Yitzchaki, I got the answer on the RavenDB mailing list:
https://groups.google.com/forum/?fromgroups=#!topic/ravendb/hxP3REWVMdg

正确的方法是将web.config中的AnonymousAccess设置设置为Admin:

The correct way of doing it was to set the AnonymousAccess setting in web.config to Admin:

<add key="Raven/AnonymousAccess" value="Admin"/>

AnonymousAccess设置没有充分的文档说明,但是它告诉RavenDB如何对待匿名用户.在这种情况下,它将全部视为admin,因此应仅在开发中使用.对于生产,应将其重置为默认值All.

The AnonymousAccess setting is not well documented, but it tells RavenDB how to treat anonymous users. In this instance, it treats all as admin and should therefore only be used in development. For production, it should be reset to the default value which is All.

这篇关于在IISExpress上运行RavenDB时无法创建数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆