473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reg expressions in the Machine.Config

I've got several regular expression strings that I want to store in the
machine config. One of the strings contains a ampersand character. For some
reason this can't be stored in a string in the config. When the string
contains the & character the app throws errors on start. I've tried to put
the string in a CDATA element but that didn't seem to make a difference.

Anyone have any suggestions?

TIA

John
Jul 21 '05 #1
1 1200
Finally saw the obvious on this one.
The & has to be entered as &

When the XML is parsed it will convert it to an & (same thing with the < ,
&lt;)

John

"John S" wrote:
I've got several regular expression strings that I want to store in the
machine config. One of the strings contains a ampersand character. For some
reason this can't be stored in a string in the config. When the string
contains the & character the app throws errors on start. I've tried to put
the string in a CDATA element but that didn't seem to make a difference.

Anyone have any suggestions?

TIA

John

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5095
by: mark | last post by:
i am attempting to write a script using Net::Telnet. The script telnets to a machine logs in and issues a command to list the config. Tthe output of the command pauses about every screenfull...
9
2970
by: Marina Anufreichik | last post by:
Hi, After deploymnet web application on web server I can access page on local machine and login fine but when I'm trying to access web site from remote machine I can see login page, but when I'm...
0
1487
by: Roy Chastain | last post by:
I have a simple page or two and a simple global.asax file that loads some configuration from the web.config file. I developed this on a Windows XP box with framework version 1.1 installed. I run...
6
2462
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the...
1
253
by: John S | last post by:
I've got several regular expression strings that I want to store in the machine config. One of the strings contains a ampersand character. For some reason this can't be stored in a string in the...
2
3483
by: Max Metral | last post by:
I'm trying to set the default behavior of customErrors in the machine.config. The documentation seems to suggest this should work, but it doesn't seem to work for me. On my development machine, I...
11
3420
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand...
0
2427
by: CSharpner | last post by:
How can I do the following?: Have a label on a form have its Text property bound to a setting from one of my DLL library's config files? I've followed these instructions to successfully get...
5
2848
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 =...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.