Format of the initialization string does not conform to specification starting at index 0.

I am developing an ASP.NET MVC5 application in C# using NHibernate and MySQL. At time of building NHibernate Session factory, i am getting the following error.


Format of the initialization string does not conform to specification starting at index 0.

I have checked my database, models, mapping files. All are OK.

Following is the code to build session factory.


public static ISessionFactory GetSessionFactory()

{

var Config = new NHibernate.Cfg.Configuration();
Config.DataBaseIntegration(delegate(NHibernate.Cfg.Loquacious.IDbIntegrationConfigurationProperties dbi)

{

dbi.ConnectionStringName = "ConnectionString1";

dbi.Dialect<NHibernate.Dialect.MySQL55Dialect>();

dbi.Driver<NHibernate.Driver.MySqlDataDriver>();

dbi.Timeout = 255;

}

);
Config.CurrentSessionContext<WebSessionContext>();
Config.AddAssembly("Test");
return Config.BuildSessionFactory(); /*Error on this line*/
}

PTI Junior Programmer Asked on December 12, 2015 in ASP.NET.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.