473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 4310
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.com> wrote in message
news:u1**************@TK2MSFTNGP12.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*******@newsgroups.nospam> wrote in message
news:O3**************@TK2MSFTNGP09.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.com> wrote in message
news:u1**************@TK2MSFTNGP12.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
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....
2
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...
3
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...
2
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...
2
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...
2
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...
6
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
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...
1
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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
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...
0
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...

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.