473,804 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "Unrecogniz ed element 'add'" is reported.

....
<pages>
<namespaces>
<clear></clear>
<add namespace="Syst em"/>
....

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

....
<pages>
<namespaces>
<clear/>
<add namespace="Syst em"/>
....

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 4604
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****@microsof t.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*****@commun ity.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 "Unrecogniz ed element 'add'" is
reported.
>
...
<pages>
<namespaces>
<clear></clear>
<add namespace="Syst em"/>
...

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

...
<pages>
<namespaces>
<clear/>
<add namespace="Syst em"/>
...

InstallSheid l/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****@microsof t.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*****@commun ity.nospam>
References: <B5************ *************** *******@microso ft.com>
<dj************ **@TK2MSFTNGHUB 02.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
1577
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 the aspx (as you would realistically) I get this : Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root...
3
4918
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. -------------------------------------------------------------------------------- Runtime Error Description: An application error occurred on the server. The current
25
2868
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 the aspx (as you would realistically) I get this : Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root...
6
3890
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 of the web app 3)restarting IIS 4)recreating the virtual dir in IIS 5)playing with any and all settings I could find for the web app in IIS, including changing permissions 6)recopying the machineconfig file from my asp v1.4... onto my local server
2
1482
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 get the following error on the server:
1
3300
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 changed. The only thing I noticed is that it mentions "Using host configuration file: \\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config". Seems pretty strange the "\\?\c:" Oh, of course the file is in the .bin directory...
2
2338
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. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
0
9587
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
10340
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...
1
10324
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
9161
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
5527
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...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
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
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
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.