By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,760 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,760 IT Pros & Developers. It's quick & easy.

web.config appSettings Store value with & character

P: n/a
Max
hi

i have stored my connction string in web.config as we do usually. code
of web.confing is given below.

check the password field contain "&" character. now when i run my
application it gives error because value of ConnectionString is breaked
at "&".

So how to store value in web.config that contain "&" character, if any
one know the solution pls let me know. code of web.config and error
given by visual studio is given below.

<configuration>
<appSettings>
<add key="ConnectionStri

ng" value="server=localhost;user id=mas;password=mas&2003;database=CMS"
/>
</appSettings>
....
....
and so on </configuration>

Error Give by VS 2003
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: Reference to undeclared parameter entity, 'max'.

Source Error:

[No relevant source lines]
Source File: D:\dnSource\HOMEAPPS_mahesh\web.config Line: 0

Aug 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
See my reply at microsoft.public.de.german.entwickler.dotnet.asp.

Use "&amp;" instead of "&".

Regards,
Michael
"Max" <ma***********@gmail.comschrieb im Newsbeitrag
news:11*********************@i3g2000cwc.googlegrou ps.com...
hi

i have stored my connction string in web.config as we do usually. code
of web.confing is given below.

check the password field contain "&" character. now when i run my
application it gives error because value of ConnectionString is breaked
at "&".

So how to store value in web.config that contain "&" character, if any
one know the solution pls let me know. code of web.config and error
given by visual studio is given below.

<configuration>
<appSettings>
<add key="ConnectionStri

ng" value="server=localhost;user id=mas;password=mas&2003;database=CMS"
/>
</appSettings>
...
...
and so on </configuration>

Error Give by VS 2003
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: Reference to undeclared parameter entity, 'max'.

Source Error:

[No relevant source lines]
Source File: D:\dnSource\HOMEAPPS_mahesh\web.config Line: 0

Aug 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.