ravendb

RavenDb - The remote server returned an error: (403) Forbidden

♀尐吖头ヾ 提交于 2019-12-03 11:13:32
When I try to create a database people collection on RavenDb, I get the following error: The remote server returned an error: (403) Forbidden. I hots the Raven on IIS and I am not sure what is going on. On the raven Management Studio, when I try to create a database, I get the below result: Could not authenticate against server Message: The remote server returned an error: NotFound. Uri: /databases?database=Default Server Uri: http://localhost:8888/docs/Raven/Databases/People -- Error Information -- System.Net.WebException: The remote server returned an error: NotFound. at System.Net.Browser

RavenDB full-text search

耗尽温柔 提交于 2019-12-03 09:34:46
问题 Can you please tell how to perform simple full-text search in RavenDb . The database is stored document: Movie {Name = "Pirates of the Carribean"} . I wish that this document was found on the search phrase "Pirates Carribean" or any other combination of words. 回答1: What you are worrying about isn't anything to do with full text - by default Lucene works on an OR basis and what you want is an AND If I were you I'd do String[] terms = searchTerm.Split(" "); // Or whatever the string.split

How do I install and setup the RavenDb index replication

旧城冷巷雨未停 提交于 2019-12-03 09:06:06
rI've looked at the questions and indeed the RavenDb docs. There's a little at RavenDb Index Replication Docs but there doesn't seem any guidance on how/when/where to create the IndexReplicationDestination Our use case is very simple (it's a spike). We currently create new objects (Cows) and store them in Raven. We have a couple of queries created dynamically using LINQ (e.g. from c in session.Query<Cows> select c ). Now I can't see where I should define the index to replicate. Any ideas? I've got hold of the bundle and added it to the server directory (I'm assuming it should be in RavenDB.1.0

Nuget dependency error installing RavenDb Embedded

梦想与她 提交于 2019-12-03 08:19:43
问题 I am trying to install RavenDB.Embedded in an ASP.NET MVC 5 application, but I have this dependency error: PM> Install-Package RavenDB.Embedded Attempting to resolve dependency 'RavenDB.Database (= 2.5.2750)'. Attempting to resolve dependency 'System.Spatial (≥ 5.2)'. Attempting to resolve dependency 'WindowsAzure.Storage (≥ 2.0)'. Attempting to resolve dependency 'Microsoft.WindowsAzure.ConfigurationManager (≥ 1.7.0.0)'. Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.0.2)'.

Ravendb mapreduce grouping by multiple fields

孤街醉人 提交于 2019-12-03 07:36:47
We have a site that contains streaming video and we want to display three reports of most watched videos in the last week, month and year (a rolling window). We store a document in ravendb each time a video is watched: public class ViewedContent { public string Id { get; set; } public int ProductId { get; set; } public DateTime DateViewed { get; set; } } We're having trouble figuring out how to define the indexes / mapreduces that would best support generating those three reports. We have tried the following map / reduce. public class ViewedContentResult { public int ProductId { get; set; }

RavenDB Attachments - Functionality how to do?

孤人 提交于 2019-12-03 06:46:22
I have a file input control. <input type="file" name="file" id="SaveFileToDB"/> Lets say I browse to C:/Instruction.pdf document and click on submit. On Submit, I want to save the document in RavenDB and also later retrieve it for download purposes. I saw this link http://ravendb.net/docs/client-api/attachments that says.. do this.. Stream data = new MemoryStream(new byte[] { 1, 2, 3 }); documentStore.DatabaseCommands.PutAttachment("videos/2", null, data, new RavenJObject {{"Description", "Kids play in the garden"}}); I am not following what 1,2,3 mean here and what it means to say videos/2 in

Membership systems for MVC4 that support RavenDB

徘徊边缘 提交于 2019-12-03 06:06:59
问题 I create a lot of quick "proof of concept" MVC apps and I actually found the SimpleMembership provider that shipped with the MVC4 templates to be very handy since it gets me up and running with user registration & OAuth in a matter of minutes. But...I've started to use RavenDb (on RavenHQ for a lot for my projects). So, I starting trying to implement my own "custom membership provider" based on the ExtendedMembershipProvider and while doing that I realized that didn't make much sense. I later

Retrieving entire data collection from a RavenDB

允我心安 提交于 2019-12-03 05:52:48
问题 I have a requirement where I need to fetch the entire data collection Users from RavenDB and compare the retrieved result set with another set of data. There are close to 4000 records in this particular collection. Because Raven is Safe By Default, I keep getting an exception for either Number of requests per session exceeded or it returns the maximum 128 records. I don't want to set the property Session.Advanced.MaxNumberOfRequestsPerSession to a higher value. What query should I use to get

How could I make my RavenDB application execute properly when UseEmbeddedHttpServer is set to true using 2-tier architecture?

最后都变了- 提交于 2019-12-03 04:52:51
问题 I used RavenDB-Embedded 2.0.2230 in my application interacted with ASP .Net Web API in different assemblies. When I set UseEmbeddedHttpServer = true on the document store, first time I send a request to RavenDB, it executes properly but when I try for the second time my application displays Raven Studio. When I remove UseEmbeddedServer setting, my application runs without any problems. My RavenDB is configured with the following codes in data tier : this.documentStore = new

How do I create a ClaimsIdentity object for Asp.NET MVC 5?

不羁的心 提交于 2019-12-03 04:50:15
问题 I am working in a .NET MVC 5 application. I do not want to use Entity Framework. I want to authenticate to a RavenDB database. It looks to me that I want to replace the UserManager that comes with the Account Controller. I think I can rewrite all the UserManager functions to work with my database, except I don't understand the ClaimsIdentity object. In the SignInAsync method, there is a call to UserManager.CreateIdentityAsync(...) . I know it returns a ClaimsIdentity object. What I don't know