neo4j-examples/movies-dotnet-neo4jclient

Server Error in '/' Application.

Closed this issue · 3 comments

Received an unexpected HTTP status when executing the request.

The response status was: 401 Unauthorized

The response from Neo4j (which might include useful detail!) was: {
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
}

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ApplicationException: Received an unexpected HTTP status when executing the request.

The response status was: 401 Unauthorized

The response from Neo4j (which might include useful detail!) was: {
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
}

Source Error:

Line 29: var password = ConfigurationManager.AppSettings["issar"];
Line 30: var client = new GraphClient(new Uri(url), user, password);
Line 31: client.Connect();
Line 32:
Line 33: GraphClient = client;

Source File: C:\Users\isarab\Desktop\master project\dotNET\movies-dotnet-neo4jclient-master\Neo4jDotNetDemo\App_Start\WebApiConfig.cs Line: 31

jexp commented

Did you configure your neo4j-server with a password and did you provide that password in the app-settings?

yes i did. I just miss edited the app-settings values.
Thank you

Cool I was just about to say you need to set the values like:

    <add key="GraphDBUser" value="USERNAME HERE"/>
    <add key="GraphDBPassword" value="PASSWORD HERE"/>