[Mono-list] ConfigurationManager.ConnectionStrings is NULL
weng nanshan
nsweng at gmail.com
Wed Apr 2 15:38:04 UTC 2014
I tested in original mono3.2.3 and the patched(https://github.com/mono/mono/pull/643), both fail!
Is the Web.config file permission problem?
Anyone not hit this problem? Aha...
----- Original Message -----
From: "Andrés G. Aragoneses"
To: Mono-list at lists.ximian.com
Sent: Wednesday, April 02, 2014 3:18 AM
Subject: Re: [Mono-list] ConfigurationManager.ConnectionStrings is NULL
I don't recommend you to patch Mono 2.8.x, I recommend you to upgrade to
Mono 3.2.x before doing anything else.
On 01/04/14 18:54, weng nanshan wrote:
> Thank Andrés G. Aragoneses for your replay!
>
> The problem I hitting looks similar to the bug you mentioned as
> https://bugzilla.xamarin.com/show_bug.cgi?id=11972
> I modified some code in mono2.8 according to the suggestion in
> https://github.com/mono/mono/pull/643, there is still the the problem.
> (Maybe I did not merge the modification correctly, for I did not get the
> full-version of modified source files,because the network is so so slowly.)
>
> Fail to get ConfigurationManager.AppSettings and
> ConfigurationManager.ConnectionStrings from web.config!
> My web app is running on CentOS6.2 + nginx + fastcgi-mono-server + mono2.8.
>
> Which module of mono would cause the problem, MCS or runtime?
>
> What shall I do?
>
> Any suggestion is welcome!
>
> ----- Original Message -----
> *From:* "Andrés G. Aragoneses" <mailto:knocte at gmail.com>
> *To:* Mono-list at lists.ximian.com <mailto:Mono-list at lists.ximian.com>
> *Sent:* Sunday, March 30, 2014 7:30 PM
> *Subject:* Re: [Mono-list] ConfigurationManager.ConnectionStrings is
> NULL
>
> On 28/03/14 15:50, weng nanshan wrote:
> > 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!
>
> Mono 2.x is very old, upgrade please.
>
> If you still hit the problem in Mono 3.2.x, then maybe you're hitting a
> similar (or same) bug as
> https://bugzilla.xamarin.com/show_bug.cgi?id=11972
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> <mailto:Mono-list at lists.ximian.com>
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20140402/2e8ead52/attachment.html>
More information about the Mono-list
mailing list