Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

Web.config error

156 vues
Accéder directement au premier message non lu

Russ Bjorgaard

non lue,
11 sept. 2002, 12:21:5911/09/2002
à
Does anyone see my error here?
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Only elements allowed

Source Error:

Line 3:
Line 4: <appSettings>
Line 5: <add key="connectionString" value="data source=mysource;initial
catalog=mydb;persist security info=False;uid=Fred;pwd=Flintstone1;packet
size=4096"/>
Line 6: </appSettings>
Line 7:

Source File: c:\inetpub\wwwroot\Bonds\web.config Line: 5


Greg Burns

non lue,
11 sept. 2002, 12:39:0811/09/2002
à
Russ,

Make sure you are placing <appSettings> inside of <configuration> but
outside of <system.web>

Greg

"Russ Bjorgaard" <ru...@acordiamn.com> wrote in message
news:#9SE38aWCHA.2476@tkmsftngp09...

Russ Bjorgaard

non lue,
11 sept. 2002, 12:50:1611/09/2002
à
I double checked it is inside of the <configuration> and outside of the
<system.web>. Very strange, could it be the way I am calling it?
ConfigurationSettings.AppSettings["connectionString"].ToString();

"Russ Bjorgaard" <ru...@acordiamn.com> wrote in message
news:#9SE38aWCHA.2476@tkmsftngp09...

Greg Burns

non lue,
11 sept. 2002, 12:58:5311/09/2002
à
I believe AppSettings already returns a string. But regardless, there error
is typical of a syntax problem in your web.config. Remeber XML is case
sensitive. Though I noticed nothing wrong in your example.

If you want to email me you web.config I'll take a look.

greg_...@hotmail.com

Greg


"Russ Bjorgaard" <ru...@acordiamn.com> wrote in message

news:OJKzqMbWCHA.2548@tkmsftngp11...

Greg Burns

non lue,
11 sept. 2002, 13:40:4711/09/2002
à
Weird. You're web.config had a hidden character (Ā) that I could only see
by opening in PrimalScript. Delete you whole appSettings sections and
retype. It will work. I will send you a copy that does.

MCSD
Greg


"Greg Burns" <greg_...@hotmail.com> wrote in message
news:un3rbRbWCHA.1688@tkmsftngp10...

0 nouveau message