Hi,all

I am runing a web application on mono. There is a strange problem.
I define a database connection string in Web.config file, as the following:

<connectionStrings>
    <add name="MySqlConnectionStr" 
connectionString="server=localhost;database=dbmy;password=123456;user=root;port=3306;"/>
</connectionStrings>

And I want to get the connection string in program, using 
"ConfigurationManager.ConnectionStrings["MySqlConnectionStr"]".
It fail! And I find that 
ConfigurationManager.ConnectionStrings["MySqlConnectionStr"] is NULL. So I 
can't get the connection string.

The program is written in .net2.0, and run well on Windows and MS .Net 
framework. But on CentOS6.2 and Mono, there is the problem above.
I test Mono2.6.7, Mono 2.8, Mono2.10.6, there is the same problem.

I try many way to solve the problem, but fail!

Anyone kind to help me! Any suggestion is welcome!

Thanks very much!
Weng
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to