473,386 Members | 1,654 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,386 software developers and data experts.

Error parsing web.config file

I am re-posting this message after registering my posting alias.

When I specify an end tag for the clear element of namespaces in my
web.config file, the parser error "Unrecognized element 'add'" is reported.

....
<pages>
<namespaces>
<clear></clear>
<add namespace="System"/>
....

When the same element is specified using the empty element tag syntax, it
works.

....
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
....

InstallSheidl/MSI is creating the XML file, and I therefore have no control
over the format details. Is this a known problem? How can I work around it,
short of generating the XML file myself?

Thanks

Jul 10 '08 #1
3 4562
Hi Peabody,

Regarding on the web.config parse error, based on my research, there does
exists an known issue of the ASP.NET web application's configuration file.
When you add <clearelement to remove any collection elements, you need to
use the <clear/format instead of <clear></clearsyntax. There has some
problems within the configuration parsing code of ASP.NET.

I have also discussed with some other ASP.NET dev engineers, so far the
problem hasn't a fix and the recommend workaround is to change
<clear></clearsyntax to <clear/so as to avoid the error.

As you mentioned, for your scenario, the elements are generated by
installsheid, then, I'm wondering whether there is any customization point
at the installsheid's setup stage(such as the custom action of windows
installer package) which can let you add some code to do some customization
on the installed application files? Or whether the web.config file can be
created as static content in advance and do not let installsheild to
generate it?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?RGFuYQ==?= <Pe*****@community.nospam>
Subject: Error parsing web.config file
Date: Thu, 10 Jul 2008 11:03:03 -0700
>
I am re-posting this message after registering my posting alias.

When I specify an end tag for the clear element of namespaces in my
web.config file, the parser error "Unrecognized element 'add'" is
reported.
>
...
<pages>
<namespaces>
<clear></clear>
<add namespace="System"/>
...

When the same element is specified using the empty element tag syntax, it
works.

...
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
...

InstallSheidl/MSI is creating the XML file, and I therefore have no
control
>over the format details. Is this a known problem? How can I work around
it,
>short of generating the XML file myself?

Thanks

Jul 11 '08 #2
Hi Steven,

Thanks for your reply. Since our installer updates appSettings based on
user input, we can't use a static configuration file. It appears that we'll
need to forego the XML functions in InstallShield/MSI and maintain the file
ourselves. Thanks again for your help.

Dana
Jul 11 '08 #3
Thanks for your quick reply Dana,

It is a pity that this is an existing issue which is hard to directly
workaround and I feel sorry for the inconvenience it brings you. If you
have any other ASP.NET dev questions, welcome to post here.

Thanks for your understanding!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?RGFuYQ==?= <Pe*****@community.nospam>
References: <B5**********************************@microsoft.co m>
<dj**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Error parsing web.config file
Date: Thu, 10 Jul 2008 20:49:02 -0700
>
Hi Steven,

Thanks for your reply. Since our installer updates appSettings based on
user input, we can't use a static configuration file. It appears that
we'll
>need to forego the XML functions in InstallShield/MSI and maintain the
file
>ourselves. Thanks again for your help.

Dana
Jul 11 '08 #4

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

Similar topics

8
by: n3crius | last post by:
hi, i just got a web host with asp.net , seemed really cool. aspx with the c# or vb IN the actual main page run fine, but when i use codebehind and make another source file ( a .cs) to go with...
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
25
by: n3crius | last post by:
hi, i just got a web host with asp.net , seemed really cool. aspx with the c# or vb IN the actual main page run fine, but when i use codebehind and make another source file ( a .cs) to go with...
6
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making sure all dll's are in the bin folder in the root...
2
by: Brett | last post by:
I uploaded an ASP.NET website from my developer machine to a remote server. The paths differ slightly as follows: Local Path: C:\Inetpub\wwwroot\mysite Server Path: C:\Inetpub\mysite.com\ I...
1
by: Carlos Sosa Albert | last post by:
Hello people, I'm having an issue registering an assembly in ONE server. I've already tried to reinstall the .NET framework 2.0 but the error is still there. I enabled the logging but nothing...
2
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.