473,657 Members | 2,481 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 1211
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
5102
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 and gives the user the prompt " --More-- ". The script contains the followin code to account fot the prompt. $telnet->waitfor('/-\-More\-\- $/i'); $telnet->print('\s');
9
2996
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 trying to login with correct credentials it give me error: Server Error in '/PDVMgr' Application. ----------------------------------------------------------------------------
0
1498
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 it on a 2003 box with both version 1.0 and 1.1 installed. This appears to work. When move the page and code to my clients hosting service (Earthlink) which only supports version 1.0 of the framework, I get the error below. I know that my...
6
2470
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 machine config, this was necessary as our web site has 4 environments and the database server has a different name in each. Since the upgrade the applications can't read the strings in 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 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
2
3495
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 want customErrors off, and on my production machine I want them to go to a friendly error page (so on with a defaultRedirect). No matter what I do, I only get "customErrors off" with setting in machine.config and not web.config. Any thoughts?...
11
3438
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 the usage of Machine config. I read in the article that you can also write your database connection string in Machine Config
0
2438
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 the DLL settings into the web.config: http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_frm/thread/173c2b36f3c679a4/e34b1675db9b4486?lnk=st&q=dotnet+applicationSettings+web.config+dll+properties&rnum=1#e34b1675db9b4486
5
2854
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 = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath) Dim section As New MembershipSection section = rootWebConfig1.GetSection("system.web/membership")
0
8394
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
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 we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.