Unrecognized element 'add' after <clear></clear>

I

InvalidLastName

In the web.config, we have defined the followings under configuration/system.web/webServices/ to secure web services application.

<protocols>
<clear></clear>
<add name="HttpPostLocalhost"></add>
<add name="AnyHttpSoap"></add>
<add name="Documentation"></add>
<remove name="HttpPost"></remove>
<remove name="HttpGet"></remove>
<remove name="Unknown"></remove>
</protocols>

However, we use an in-house deployment process, which replaces certain values in the web.config depending on the target server. The perl XML parse it used converts <clear /> to <clear></clear> shown below:

<protocols>
<clear></clear>
<add name="HttpPostLocalhost"></add>
<add name="AnyHttpSoap"></add>
<add name="Documentation"></add>
<remove name="HttpPost"></remove>
<remove name="HttpGet"></remove>
<remove name="Unknown"></remove>
</protocols>

it seems ASP.NET doesn't like <clear></clear>, although I believe <clear/> is equivalent to <clear></clear>, and we are getting the following error when web.config contains <clear></clear> instead of <clear/>, see below:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized element 'add'.

Source Error:

Line 82: <clear></clear>
Line 83:
Line 84: <add name="HttpPostLocalhost"></add>
Line 85:
 
S

Steven Cheng[MSFT]

Hello,

Regarding on the webservice <protocols> configuration issue, I have tested
it on my side and did reproduce the same behavior. Currently I'll perform
some further research on this to see whether this is a known issue or if
there is any way to workaround this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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

Steven Cheng[MSFT]

Hello,

Just inform you that I've submit a bug request internally on this issue. So
far I will wait for the product team's engineer to look into this problem.
I'll update you the latest progress on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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

Steven Cheng[MSFT]

Hello,

Regarding on this issue, the product team engineer has also repro the issue
and so far this problem has been identified as a breaking change in ASP.NET
asmx 2.0. Currently this problem has been planed to fix in Visual Studio
Oracs version. You can also submit any request on this to our public
feedback center:

http://connect.microsoft.com/feedback/default.aspx?SiteID=210

If you still need any further help or need a more straight channel to
contact the product team, you can consider contact CSS for support on this
issue:

http://msdn.microsoft.com/subscriptions/support/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top