Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Try to change: Database(MySQLConfiguration.Standard.ConnectionString(c => c.FromConnectionStringWithKey("TRP123456"))) to Database(MySQLConfiguration.Standard .ConnectionString(ConfigurationManager.ConnectionStrings["TRP123456"].ConnectionString))) Commented Jan 22, 2017 at 8:53
  • Hi Roma, thank you for your help. However, it seems does not work. I changed the code to the following but still get Null error. Database(MySQLConfiguration.Standard.ConnectionString(ConfigurationManager.ConnectionStrings["TR‌​P123456"].ConnectionString)) Commented Jan 22, 2017 at 9:24
  • are you sure that you put connection string in right config file. Do you have only one application? Commented Jan 22, 2017 at 9:26
  • Hi Roma, I am sure I put the connectionString in web.config, where people usually put it. I attached an image to show my project structure, as well as the web.config structure. Thank you. Commented Jan 22, 2017 at 10:46