ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString cannot return connection string
I want to use ConfigurationManager to return my connection string, but I got an error "Object reference not set to an instance of an object."
The code is
My MyConnectionString is in the app.config saved in the same folder of cs file that issues the command.
My application is WCF windows application. I am using vs2010.