2016-02-05 37 views
0
期间Newtonsoft.Json.Linq.JValue访问子值

我已经设置了我的Neo4j的连接,但无法正常工作而引发错误:不能Neo4jConnection

Cannot access child value on Newtonsoft.Json.Linq.JValue.

这是Neo4j的ninject模块文件:

public class Neo4jModule : NinjectModule 
{ 
    /// <summary>Loads the module into the kernel.</summary> 
    public override void Load() 
    { 
     Bind<IGraphClient>().ToMethod(InitNeo4JClient).InSingletonScope(); 
    } 

    private static IGraphClient InitNeo4JClient(IContext context) 
    { 
     var neo4JUri = new Uri("http://www.example.com"); 
     var graphClient = new GraphClient(neo4JUri, "username", "password"); 
     graphClient.Connect(); 

     return graphClient; 
    } 
} 

这是我RegisterServices我Ninject.Web.Common文件的方法:

private static void RegisterServices(IKernel kernel) 
    { 
     kernel.Load<Neo4jModule>(); 
    } 

我不易懂nd为什么我得到这个错误。这个例外被捕获:

graphClient.Connect(); 

我也调试了我的应用程序,并意识到创建graphclient对象带有许多错误。谁能帮我?

回答