36066

Unable to create databases when running RavenDB on IISExpress

Question:

As the title says. (Cross post from the mailing list: <a href="https://groups.google.com/forum/#!topic/ravendb/hxP3REWVMdg" rel="nofollow">https://groups.google.com/forum/#!topic/ravendb/hxP3REWVMdg</a>)

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

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

Answer1:

Courtesy of Fitzchak Yitzchaki, I got the answer on the RavenDB mailing list:<br /><a href="https://groups.google.com/forum/?fromgroups=#!topic/ravendb/hxP3REWVMdg" rel="nofollow">https://groups.google.com/forum/?fromgroups=#!topic/ravendb/hxP3REWVMdg</a>

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

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

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.

Answer2:

Try this.

var store = new EmbeddableDocumentStore { Configuration = { Port = 8081 }, DataDirectory = "~\\App_Data\\Raven", UseEmbeddedHttpServer = true }; store.Initialize();

Using "App_Data" will probably make it work for you.

Recommend

  • How to open Dialog Box when broadcast receive in android?
  • JAVA _Home is not set in Hadoop
  • Django, how to create a fallback language in a multilingual website?
  • Qt load indicator by animated image (aka preloader) or alternative?
  • py2exe cannot import Module from other directory
  • How to enable autocomplete when using Internet Explorer and SSL?
  • Cannot end a section without first starting one in Laravel
  • updating and compacting sqlite database in android
  • Is it good to have multiple database running in a same project?
  • Design of Service Layer and Repositories in Microsoft MVC
  • How to prevent cross domain issues by proxying in IIS?
  • Performance difference between accessing local and class member variables
  • Access PCF DEV from external machine on same network as host
  • parameterized queries in oursql
  • MySQL: Difference between `… ADD INDEX(a); … ADD INDEX(b);` and `… ADD INDEX(a,b);`?
  • If I am creating a simple client server application in IntelliJ, how should this work?
  • Cuda Clang and OS X Mavericks
  • New Firebase failed: First argument must be a valid firebase URL and the path can't contain “.”
  • JSON encode and decode on PHP
  • Building Qt project for C++11 standard
  • Exception gevent.hub.LoopExit: LoopExit('This operation would block forever',)
  • Is there a way to do normal logging with EureakLog?
  • Can I check if a recipient has an automatic reply before I send an email?
  • NHibernate Validation Localization with S#arp Architecture
  • How to rebase a series of branches?
  • How can I send an e-mail from a vbs script
  • Getting last autonumber in access
  • Accessing IRQ description array within a module and displaying action names
  • Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages
  • Adding custom controls to a full screen movie
  • Comma separated Values
  • Error creating VM instance in Google Compute Engine
  • Hits per day in Google Big Query
  • -fvisibility=hidden not passed by compiler for Debug builds
  • how does django model after text[] in postgresql [duplicate]
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Getting Messege Twice Using IMvxMessenger
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass