parsing error: ambiguous match found

Last post 09-24-2009 4:10 PM by mbaladi. 20 replies.

Sort Posts:

  • parsing error: ambiguous match found

    04-18-2006, 1:03 PM
    • Member
      136 point Member
    • newliya
    • Member since 02-21-2006, 10:46 PM
    • Posts 65

    The web application was migrated from 2003 to 2005. When I tryied to open one page, I got the error:

    Parser Error Message: Ambiguous match found.

    Source Error:

    Line 1:  
    Line 2:  <%@ Register TagPrefix="uc1" TagName="TabControl" Src="../TabControl.ascx" %> 
    Line 3:  <%@ Register TagPrefix="uc1" TagName="TreeView" Src="../MiscControls/Tree/TreeView.ascx" %>

    Source File: /xpede.net/TeamApproval/TeamApproval.aspx    Line: 1

    Could somebofay has any idea?

    Thanks a lot!

    Liya

    Liya
  • Re: parsing error: ambiguous match found

    04-19-2006, 3:27 AM
    • Star
      14,613 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator

    Hi Liya,

    The problem is that there is now a "Treeview" control built-into ASP.NET 2.0 -- and so this user control class name is conflicting with it.  Can you try renaming your control (specifically the class name)?  That should fix it.

    Thanks,

    Scott

  • Re: parsing error: ambiguous match found

    04-19-2006, 11:00 AM
    • Member
      136 point Member
    • newliya
    • Member since 02-21-2006, 10:46 PM
    • Posts 65

    Thanks for your reply.

    I changed the class name and the control name, but I still got the same error:

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Ambiguous match found.

    Source Error:

    Line 1:  <%@ Register TagPrefix="uc1" TagName="TabControl" Src="../TabControl.ascx" %> 
    Line 2:  <%@ Register TagPrefix="uc1" TagName="MyTreeView" Src="../MiscControls/Tree/TreeViewWRC.ascx" %>
    Line 3:  <%@ Page language="c#" Codebehind="TeamApproval.aspx.cs" AutoEventWireup="false" Inherits="WRC.ProjAcct.AspClient.TeamApproval.TeamApproval"%>


    Source File: /xpede.net/TeamApproval/TeamApproval.aspx    Line: 1

    What do you think the possible causes are?

    Thanks a lot,

    Liya

    Liya
  • Re: parsing error: ambiguous match found

    04-19-2006, 4:20 PM
    • Member
      136 point Member
    • newliya
    • Member since 02-21-2006, 10:46 PM
    • Posts 65

    Hi Scott,

    The additional information for this error: no matter what the first line was ( blank line, or any line in this aspx file), the same error occured.

    Actually, since the migration done, there have been raising new errors. The old version works well, but the new version trouble us lot. We are using WEb Application Project that we downloaded two months ago, we are wondering if installion of the its latest version will help.

    Thanks a lot,

    Liya 

    Liya
  • Re: parsing error: ambiguous match found

    04-19-2006, 7:10 PM
    • Star
      14,613 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator

    Hi Liya,

    I think the class name conflict is coming from within the .ascx file -- can you check to see what the class name of the .ascx file is?  I think you need to rename if from being TreeView.

    I'd definitely recommend installing the latest version of WAP.  It fixes many issues, and has much better migration support.  This walkthrough shows how to migrate from VS 2003 with it: http://webproject.scottgu.com/CSharp/Migration/Migration.aspx

    Hope this helps,

    Scott

  • Re: parsing error: ambiguous match found

    04-20-2006, 1:03 PM
    • Member
      136 point Member
    • newliya
    • Member since 02-21-2006, 10:46 PM
    • Posts 65

    Hi Scott,

    I did rename the user control's name (TreeView to TreeViewABC), but it did not work. We have another .aspx page that is with almost same content as this .aspx page (also has the TreeView Control), and it works well. Does the conflict(s)  exist in this .aspx page or the .ascx files that <@ registered in this page or any other files? When we did the migration, there were some errors, "ambiguous match found" related to TreeView and TreeNode, during compiling, and after adding the full namespace, the errors  disappeared. Now they work well except this page.

    I checked all the controls included in this page, but still have no clue.

    Do you have any idea?

    Another question, should we redo the migration against the new version Web Application Project?

    Thanks a lot,

    Liya

    Liya
  • Re: parsing error: ambiguous match found

    04-22-2006, 2:26 PM
    • Star
      14,613 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator

    Hi Liya,

    It might make sense to try it using the WAP project model and see if this helps.  Please let me know if you are still running into the ambiguous error message -- if so I can put you in contact with someone to help.

    Thanks,

    Scott

  • Re: parsing error: ambiguous match found

    04-24-2006, 9:18 AM
    • Member
      136 point Member
    • newliya
    • Member since 02-21-2006, 10:46 PM
    • Posts 65

    HI Scott,

    Thanks for your reply.

    What do you mean "WAP project model" here? We Downloaded and installed the Web Aplication project and migrated our solution according your instruction. This web project was web application project in vs 2003. If this doesn't mean "using WEB project model", could you sow me in detail how to use WEB project model?

    Thanks alot,

    Liya

    Liya
  • Re: parsing error: ambiguous match found

    04-24-2006, 10:01 AM
    • Member
      5 point Member
    • deyanp
    • Member since 04-24-2006, 1:58 PM
    • Posts 1

    If it's a Web Application Project, check your TeamApproval.ascx.cs and TeamApproval.ascx.designer.cs if they don't contain the same protected member. I got this error and I solved it by deleting 1 protected member from the TeamApproval.ascx.cs, as it was already in the TeamApproval.ascx.designer.cs file..

     

    Br,
    Deyan

  • Re: parsing error: ambiguous match found

    04-25-2006, 9:33 AM
    • Member
      136 point Member
    • newliya
    • Member since 02-21-2006, 10:46 PM
    • Posts 65

    Thanks, Deyan. This is a very good clue.

    Liya

    Liya
  • Re: parsing error: ambiguous match found

    05-24-2006, 6:05 AM
    • Member
      5 point Member
    • cyberbyber
    • Member since 05-24-2006, 9:34 AM
    • Posts 4
    check
  • Re: parsing error: ambiguous match found

    09-20-2006, 10:26 AM
    • Member
      10 point Member
    • rishi_jhaver
    • Member since 09-20-2006, 2:21 PM
    • Posts 2

    Hi Liya

    I'm having a similar problem as you did sometime back.

    Error message I'm getting is:

     

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Ambiguous match found.

    Source Error:

    Line 1:  <%@ Register TagPrefix="uc2" TagName="PhNumber" Src="~/Controls/PhNumber.ascx" %>
    Line 2:  <%@ Register TagPrefix="uc3" TagName="DtPicker" Src="~/Controls/DtPicker.ascx" %>
    Line 3:  <%@ Register TagPrefix="uc4" TagName="ClientProgramDetail" Src="~/Controls/ClientProgramDetail.ascx" %>


    Source File: /HHAMS1/Controls/ClientDetail.ascx    Line: 1

    I have already tried renaming some of my user controls that I think might have a naming clash with some other standard controls...

    Could you let me know what you did to overcome this problem.

    If anyone else knows how to resolve it, please let me know.

    Thanks, Rishi...

  • Re: parsing error: ambiguous match found

    03-08-2007, 11:27 PM
    • Member
      59 point Member
    • mikbyrne
    • Member since 05-23-2006, 5:59 AM
    • Melbourne
    • Posts 13

    Hi, I've just been wrangling with pretty much the same issue for nearly an hour. In my experience (and in most of the stuff I encountered online) it was a naming collision.

    My scenario had a server control declared in my .aspx file with the same ID as a protected object in the same page's code behind. Normally this would not even be able to compile, however the ID's of the two objects had differences in case. In my instance:

    In the .aspx file:

    <asp:Repeater ID="breadcrumbList" runat="server">

    Then in the code behind:

    protected List<BreadcrumbItem> BreadcrumbList;

    This code compiled fine, would run locally and would even build using a web deployment project without issue. But attempts to access the compiled site would trigger the "Parser Error Message: Ambiguous match found" error (on line 1 of the file with the naming collision).

    Changing the ID of either of the objects resolved the problem. Good luck.

    Mick Byrne
    Web Projects Director
  • Re: parsing error: ambiguous match found

    05-01-2007, 10:56 PM
    • Member
      213 point Member
    • shivad
    • Member since 04-11-2007, 3:59 AM
    • Posts 41
    This is usually due to namespace conflict that the page cannot decide which class to inherit
    Shiva Prasad
  • Re: parsing error: ambiguous match found

    05-18-2007, 1:36 PM
    • Member
      2 point Member
    • prashant0268
    • Member since 03-25-2003, 10:42 PM
    • Posts 6

    If you add a control to an aspx page, the control is automatically declared in the partial class by VS.Net 2005. This declaration is not visible to us.

    If we again go ahead and declare the same control in the code behind file, the code will run in DEV but your published code will not function.

    Make sure that you do not have any declarations of the controls that you have used on the pages/user controls as the declarations have already been added in the partial class

     

    Thanks

Page 1 of 2 (21 items) 1 2 Next >