473,385 Members | 1,821 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,385 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 4308
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.