RavenDb - Status Code: NotFound

I installed RavenDb with Docker using the Powershell script supplied in the Docker Hub: https://hub.docker.com/r/ravendb/ravendb/ (run-ubuntu1604.ps1).

I can log into the RavenDb admin console using localhost: 8080 and I can create a database called "mydbname".

But when I try to write a .NET program to interact with Raven, I get an error. Here is the code:

using (var store = new DocumentStore { Url = "http://localhost:8080", DefaultDatabase = "mydbname" })
{
    store.Initialize();

    using (var session = store.OpenSession())
    {
        var doc = MyClass.New();

        session.Store(doc);
        session.SaveChanges();
        Console.WriteLine("Inserted this document:");
        Console.WriteLine(doc.Name + "\t" + doc.Age + "\t" + doc.RandomString);
        Console.WriteLine();
    }
}

      

MyClass.New()

just returns a new POCO type MyClass

.

The error I get when I run this:

Unhandled Exception: Raven.Abstractions.Connection.ErrorResponseException: Status code: NotFound


   at Raven.Client.Connection.Implementation.HttpJsonRequest.<CheckForErrorsAndReturnCachedResultIfAnyAsync>d__41.MoveNext() in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Connection\Implementation\HttpJsonRequest.cs:line 385
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

      

[very long stack trace skipped]

So, have I configured something wrong, or am I writing something in C #, or what? I am using RavenDB Client 3.5.3

+3


source to share


1 answer


Matthew, There is a bug in our docker that will lead to this. We just released a fix for this in Beta 2 yesterday, but the docker image will be updated on Monday.



You can get the new version of the client here. https://www.myget.org/feed/ravendb/package/nuget/RavenDB.Client

+1


source







All Articles