Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-05-2020 10:49 AM
Hello, grouop,
I am new to Neo4j and ran into a problem executing the C# sample code from https://neo4j.com/developer/#cs-1. I am using VS2019 and the server runs at localhost:7474. (the last line from the neo4j console command is 2020-02-05 18:41:05.789+0000 INFO Remote interface available at http://localhost:7474/.
The error message is
System.Exception
HResult=0x80131500
Message=Received an unexpected HTTP status when executing the request.
The response status was: 404 Not Found
I checked the following:
List item password is correct. If I use wrong password, it returns a clear message indicating my password is wrong
List item tried .net core and .net framework 4.8.
List item change the URI in the following code from lcoalhost:7474/db/data to localhost:7474/neo4j/data or localhost:7474/db/neo4j. All of them return the same erorr message.
public Social()
{
_graphClient = new GraphClient(new Uri("http://localhost:7474/db/data"), "neo4j", "mypassword");
_graphClient.Connect();
}
02-05-2020 02:13 PM
What version of Neo4j are you using ? 4.0 / 4.0.x? or a 3.5.x release?
Can you curl
to http://localhost:7474 and get a 200 Status Code?
Does a curl
to http://localhost:7474/db/data result in a 404 status code?
Also Neo4jClient, and if not mistaken is made available through https://github.com/Readify/Neo4jClient and thus a community driver. If you need to use C# you could use the Neo4j built Bolt Driver for C# and detailed at https://neo4j.com/download-center/ , search within the page for `Official Neo4j Drivers' and choose the .Net entry
02-06-2020 08:19 AM
Also, I can confirm that the official driver works fine on both .3.5 and 4.0 versions. I guess I will switch to your official driver then.
02-05-2020 02:36 PM
Thank you for your reply. The following image is the execution result.
curl http://localhost:7474 returns 200
curl http://localhost:7474/db/data returns 302 (found)
I am wondering if my community server installation has a problem. I saw another screenshot which shows the curl 7474 port has an entry which contains "http://localhost:7474/db/data".
02-05-2020 03:13 PM
I create another neo4j database whose version is 3.5.14 using Neo4j Desktop. This new database works fine with the community driver. And the curl localhost:7474 shows data entry.
Hopefully, this can help to solve the problem.
All the sessions of the conference are now available online