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

Discussion in 'ASP .Net Web Services' started by InvalidLastName, Feb 26, 2007.

  1. 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:
     
    InvalidLastName, Feb 26, 2007
    #1
    1. Advertising

  2. 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.
     
    Steven Cheng[MSFT], Feb 27, 2007
    #2
    1. Advertising

  3. 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.
     
    Steven Cheng[MSFT], Mar 2, 2007
    #3
  4. 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.
     
    Steven Cheng[MSFT], Mar 6, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. timmso

    Unrecognized database format

    timmso, Dec 13, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    3,874
  2. elizabeth
    Replies:
    3
    Views:
    2,753
    elizabeth
    Mar 5, 2004
  3. =?Utf-8?B?Tm9ybUQ=?=
    Replies:
    2
    Views:
    2,514
    =?Utf-8?B?Tm9ybUQ=?=
    Nov 21, 2005
  4. HANM
    Replies:
    2
    Views:
    751
    Joseph Kesselman
    Jan 29, 2008
  5. Al Cholic
    Replies:
    18
    Views:
    291
    Al Cholic
    Jul 28, 2007
Loading...

Share This Page