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.
I found the problem. the configurationManager look at the app.Config under the host project rathr than the current project.
Thanks for your experience here.
Have a nice day.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?