473,978 Members | 2,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

App.Config File Question - Help

Morning!

I am developing an winform application in c#. I have an app.config file that
contains an entry with a Url address assigned to it. When I run my
application I get the following error:

The ':' character, hexadecimal value 0x3A, cannot be included in a name.

After doing some research, the problem is not the semi-colon. It's the
ampersand in the Url that is causing the error.

What is the problem? Can you not assign an & character to a string in the
App.Config? When I remove it, my application runs. I've tried rebooting and
everything.

Thanks,

Yosh
Nov 22 '05 #1
2 4345
app.config is an XML document, some characters are illegal in XML (&, <, >,
probably others). You may have to HTMLEncode the values to store them
there. (& becomes &amp, etc.)

Just tried using the new "Settings Page, Project Desinger" in VS 2005. I
tried adding a url with an & in it. When I looked at the app.config file
(that is where it saves this stuff), I see it did convert it to &amp;

Greg
"Yosh" <yo***@nospam.c om> wrote in message
news:u1******** ******@TK2MSFTN GP12.phx.gbl...
Morning!

I am developing an winform application in c#. I have an app.config file
that contains an entry with a Url address assigned to it. When I run my
application I get the following error:

The ':' character, hexadecimal value 0x3A, cannot be included in a name.

After doing some research, the problem is not the semi-colon. It's the
ampersand in the Url that is causing the error.

What is the problem? Can you not assign an & character to a string in the
App.Config? When I remove it, my application runs. I've tried rebooting
and everything.

Thanks,

Yosh

Nov 22 '05 #2
that should have been &amp; not &amp

"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:O3******** ******@TK2MSFTN GP09.phx.gbl...
app.config is an XML document, some characters are illegal in XML (&, <,
>, probably others). You may have to HTMLEncode the values to store them

there. (& becomes &amp, etc.)

Just tried using the new "Settings Page, Project Desinger" in VS 2005. I
tried adding a url with an & in it. When I looked at the app.config file
(that is where it saves this stuff), I see it did convert it to &amp;

Greg
"Yosh" <yo***@nospam.c om> wrote in message
news:u1******** ******@TK2MSFTN GP12.phx.gbl...
Morning!

I am developing an winform application in c#. I have an app.config file
that contains an entry with a Url address assigned to it. When I run my
application I get the following error:

The ':' character, hexadecimal value 0x3A, cannot be included in a name.

After doing some research, the problem is not the semi-colon. It's the
ampersand in the Url that is causing the error.

What is the problem? Can you not assign an & character to a string in the
App.Config? When I remove it, my application runs. I've tried rebooting
and everything.

Thanks,

Yosh


Nov 22 '05 #3

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

Similar topics

3
1798
by: david | last post by:
I found my web.config file always in lock mode, when I tried to modify it, I ofter got "Can not create web.config" error. I had to reboot my machine, and before I accessed any site I can modify it. I think microsoft creates the ..NET structure so that user can modify config file easier without restart service. I am not sure why my web.config works like that? Could someone explain this to me? And is there a easier way I can modify the config...
2
933
by: Suresh Gladstone | last post by:
Hi, This is a bit with versioning and installation of the .NET dlls. I want to perform the following, 1. A third party application will be invoking my .NET dll through COM interop . For this I have used Regasm and registered the assembly in the registry with CODEBASE option. eg: regasm myDll.dll /tlb:myDll.tlb /codebase
3
1830
by: Simon | last post by:
Hi everyone, I really need help with the following: It's common in app development to create numerous projects under one solution that as a whole combine to become your final application. For example I have a solution that has four subprojects - 3 class libraries and 1 windows forms app. Q - Some of these projects - both class library and win form application
2
1837
by: bmcelhany | last post by:
Hi all, I have a solution with 4 projects: a class library, a windows app, a windows service, and an installer project. The class library handles all communication with the database and its classes are used by both the application and the service. I have stored the database connection string in an app.config file located in the class library project. Everything was working fine on my dev box, but when I migrated to the QA box, I...
2
3709
by: Richard | last post by:
Hi, I'm having trouble setting up a config file based trace switch & listener. I added an application config file to my console based C# program using the "Add New Application Config File" button from solution explorer. My config file is composed of the following, which is almost a verbatum cut & paste from MSDN help: --------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8" ?>...
2
2274
by: PMac | last post by:
I'm trying to execute a stand-alone console application from an aspx page when a use clicks a button on that page. On the aspx page is the following lines of pertinent code: private void btnStartApp(object sender, System.EventArgs e) { Process procID; string procName; ProcessStartInfo psi = new ProcessStartInfo();
6
2484
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
2580
by: Joseph Geretz | last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The only way I know how to configure this is via a .config file. Normally, the ..config file is the same name as the base application. I built a .NET driver program to test this, NetBrokerDriver and provided a NetBrokerDriver.exe.config file which specifies the following: <messaging> <maxRequestLength>-1</maxRequestLength> </messaging>
1
1703
by: comic_rage | last post by:
Hi, I am trying to read from my application config file and keep getting null. Here is my config file My application is called SampleApp.exe
12
13455
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD file was built by draging tables from the Data Sources pane. Auto-generated code created the files associated wtih the XSD file (xss,
0
10358
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
10175
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
11833
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...
0
11422
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10920
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10087
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
6424
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
5162
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
4742
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.