Ambiguous match found

Looks like I've been away a few months. Sorry 'bout that. I've had stuff to write about but not enough time to set aside to do so, which is a little ironic; one of the main reasons I created this blog was so I could take 5 minutes and jot down stuff I find out while developing, largely in case it helps others, not so I could write my usual verbose 5000 word essays (which is what my AspAlliance site is for!).

So, on that note, I wanted to share how I solved a goofy error that made no sense. I was upgrading a good-sized web application from .NET 1.1/Visual Studio 2003 to .NET 2.0/Visual Studio 2005 using Scott Guthrie's well-written instructions and the Web Application Projects add-in. Going through VS2005's automatic conversion and building it was pretty painless when I followed Scott's instructions; one wrinkle I ran into is that it forgot about the three web projects, so I had to add those manually using "Add Existing Project" after I converted the others.

But it built and I went through the app and everything was fine. I didn't do the "Convert to Web Application" command on the whole project, preferring to keep a closer eye on what it changed, and touch it up after. So I started doing it folder by folder per Step 8 inScott's instructions, and it seemed to work great, until I got to one particular page and got this 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:  <%@ Control language="c#" Inherits="MyApp.Namespace.MyCoolControl" CodeBehind="
MyCoolControl.ascx.cs" AutoEventWireup="false" %>
Line 2:  <%@ Import Namespace="
MyApp.OtherNamespace" %>
Line 3:  <div class="openingParagraph">

Source File: /MyApp/Namespace/
MyCoolControl.ascx    Line: 1

So it says Line 1, Line 1 is highlighted, and yet, the only reference in line 1 is a fully-qualified one. To be safe, I pulled all my custom assemblies into the invaluable .NET Reflector and double-checked, and there was only one instance of that class name anywhere.

I tried what I normally try when I get weird ASP.NET errors I shouldn't be getting, a process many of you are probably too familiar with if you've worked with ASP.NET very long. I restarted IIS, deleted and recreated the application in IIS Manager, deleted the Temporary ASP.NET Files directory for MyApp (after closing Visual Studio), restarted Visual Studio and rebuilt the project, etc. None of these helped this time.

Scott's instructions mentioned this error in some cases, notably the IE WebControls, but the solution has been to specify the full namespace, not just the class name, so that didn't help me. Other Google search results were similarly unhelpful, until I found the blog of a guy named Eran Sandler who talked about his "Ambiguous match found" error and how he solved it--two protected fields with names that differed only in case, apparently confusing reflection.

Sure enough, my code had the same problem--I had myRepeaterControl (name changed to protect the innocent, of course), and MyRepeaterControl in my code-behind. The latter wasn't used and was probably left in mistakenly; I removed it, it still built fine, and the control worked great.

Thanks, Eran!

Published Friday, August 11, 2006 1:31 PM by pjohnson
Filed under: ,

Comments

# Interesting Finds: August 10 part 2 and August 11, 2006

Friday, August 11, 2006 11:24 PM by Jason Haley

# re: Ambiguous match found

Hi There Peter.

I'm glad that my post helped you solve the problem :-)

It's always nice to see that something I write about in the blog eventually help real people in real situations.

Sunday, August 20, 2006 3:53 AM by Eran Sandler

# re: Ambiguous match found

Argh! If only I found this 3 days ago. What a nasty & obscure problem. I would never have thought to look for conflicting  private/protected names with different cases :S

Tuesday, August 22, 2006 12:17 AM by Andy Wentworth

# re: Ambiguous match found

Hi, I had the same problem. It turned out to be a different resolution: The web site was configured for .NET 2.0 instead of .NET 1.1 (as the case for this old project). Changed it in IIS Settings (ASP.NET tab) and fixed. May help someone else.

Tuesday, August 22, 2006 3:42 AM by Matt

# re: Ambiguous match found

Thank you so much, this definitely helped end my frustration with this problem!  Only wish I could have found it sooner!  :)

Tuesday, August 22, 2006 12:00 PM by Natalie

# re: Ambiguous match found

Sure saved me many hours. Thanks!

Thursday, August 24, 2006 5:11 PM by Chris Mohrbacher

# re: Ambiguous match found

This really helped thanku.

Tuesday, September 19, 2006 11:38 AM by uz

# re: Ambiguous match found

Thanks! Saved us lots of time, too. One more thing of note: it doesn't seem to matter that the two similarly named fields both be protected. I changed one of mine to private -- it no longer needed the protected scope anyway -- but that did'nt help. Only by giving them different names did the page work.

Tuesday, September 26, 2006 4:55 PM by Rich Armstrong

# re: Ambiguous match found

Thanks Peter for clarifying this head-scratcher. It really saved me a bunch of time.

Thursday, November 09, 2006 12:56 PM by Tibor Biro

# re: Ambiguous match found

Fabulous - you've saved my bacon.

Wednesday, November 15, 2006 7:33 AM by Paul Robinson

# re: Ambiguous match found

Thank's Peter... this one stumped me till I just ran across your blog.

Thursday, November 30, 2006 4:31 PM by Mike M

# re: Ambiguous match found

Thanks! Helped me out and saved MUCH debugging time.

Monday, December 04, 2006 8:04 AM by Staffan Eketorp

# re: Ambiguous match found

Thankyou. That solved my issue too, I renamed my private variables, redeployed and it worked.  

Wednesday, December 13, 2006 4:17 AM by Happy Coder

# re: Ambiguous match found

I run into the similar problem. I found the solution reading you blog. I post my owner intro. Thank you !

Wednesday, January 24, 2007 2:29 PM by gbulfon

# re: Ambiguous match found

thanks,  i have the same problem.

Tuesday, February 27, 2007 1:04 AM by shanghai

# re: Ambiguous match found

Thank's Peter, I'd been scratching my head for ages with this problem until I found this blog. 30 seconds later the issue was fixed. Just in time too, the software is being released to a customer tomorrow.

Tuesday, February 27, 2007 7:18 AM by Scott

# re: Ambiguous match found

Got the same "Ambiguous match found" error, but wasn't same cause. Instead it was because of a custom Collection (and the "Ambiguous match found" also pointed to the line of code that had my custom Collection). To resolve I actually found an MS article!

http://support.microsoft.com/kb/823194

Hope this helps others.

Friday, March 09, 2007 6:47 PM by Matt B

# re: Ambiguous match found

how did you guys find the similarly named controls?

Wednesday, March 14, 2007 4:19 PM by DarthFahza

# re: Ambiguous match found

This solved my problem, thanks!

Tuesday, April 24, 2007 10:40 AM by AndyC

# re: Ambiguous match found

Changing the IIS settings helped, thanks a bunch :) We have two environments going one on 2.0 and one on 1.1 and someone must have switched the 1.1 to 2.0 by accident, this saved me hours.

Friday, May 04, 2007 5:21 PM by KathyF

# re: Ambiguous match found

Thanks a lot, it was great that i found the solution atlast through your blog. Great work.

Monday, May 07, 2007 12:06 AM by Bhakee

# re: Ambiguous match found

MUCH appreciated!

I thought for sure my IIS was screwed up - until I got the same error on another machine.  Got smart and found your post - thanks for taking the time to put this kind of info up!

Monday, May 07, 2007 9:25 PM by TDriver

# re: Ambiguous match found

I received this Ambiguous match on parts of my web app and searching the web didn't offer many suggestions.  I am glad I found this thread, but I did not look to see if I had any naming conflicts.  

My fix was resolved by Unchecking "Allow this precompiled site to be updated" through Publish Web Site.  Uploaded code to production server and everything worked fine.

Thursday, May 10, 2007 12:53 PM by mdmangus

# re: Ambiguous match found

mdmangus:

I don't have time to dig into it much right now, but it makes sense that you're solving the same problem/cause a different way. I got the error when dynamic compilation (on MyCoolControl.ascx) ran into a naming conflict, and you skipped dynamic compilation by compiling it all ahead of time. Offhand though, I'm not sure why you wouldn't get the error during build/publish (which I believe does the tasks done during dynamic compilation, just ahead of time).

--Peter

Thursday, May 10, 2007 3:06 PM by pjohnson

# re: Ambiguous match found

I checked the all the naming of control placed on the web page.I found one protected  asp:textbox control has similar name(Role) with the private string role.I changed the Role to txtRole.And a dynamic asp:label created twice in my page.I removed one of the dynamically created label control.It fixed my problem

Thanks a lot for the information provided on this blog.

Thursday, May 10, 2007 4:20 PM by vinod parnati

# re: Ambiguous match found

I had this problem when uploading a .net v1.1 app to v2.0 hosting.  I set the hosting to v1.1 and the problem was solved.

Monday, May 21, 2007 9:14 AM by Darren

# re: Ambiguous match found

30 seconds on google and you had the answer, Perfect.  In my case it was a private variable conflicting with a custom controls id.  

Sounds like .Net needs to make up it's mind about whether it should be case sensitive or not.

Sunday, June 24, 2007 10:29 PM by Chris Lively

# re: Ambiguous match found

Thanks. It helped me to solve my problem

Tuesday, June 26, 2007 5:42 AM by nitesh

# re: Ambiguous match found

Brilliant, saved me a lot of time. Thanks.

Wednesday, July 18, 2007 12:08 PM by Nev

# re: Ambiguous match found

I found this error when I have my webservice installed in ver 1.1 in a different pool and my application in ver 2.0 in a different pool

Monday, July 23, 2007 9:16 AM by Ganesh

# re: Ambiguous match found

I used the "Allow this precompiled site to be updated" advice above and this fixed the problem for me. This is a great relief because the page I was having the issue with has some 50 controls on it. I could compile and run this page locally without error, but when deployed I would get the runtime error "Ambigous Match Found". This kind of cr@p drives me nuts, so glad there was an easy fix!

Tuesday, July 24, 2007 12:52 PM by Jeff

# re: Ambiguous match found

Thanks for this post, saved me loads of time!

Friday, July 27, 2007 10:17 AM by Barry

# re: Ambiguous match found

Thank you!! You saved my brain from frying!!

Wednesday, August 01, 2007 1:27 PM by Linda

# re: Ambiguous match found

          Good one!!!It helped me a lot and saved my time sticking behind thos problem.

Thanks for the valuable messages in the slot.

Thursday, August 09, 2007 7:35 AM by Simple

# re: Ambiguous match found

I've found a good way of identifying the similarly named variables that cause the 'Ambiguous match found' problem:

On the page or control that is affected, right click on it in the solution explorer and click 'Convert to web application'. A message box will be shown telling you the names of the conflicting variables to rename.

Friday, August 17, 2007 11:23 AM by Martin Bell

# re: Ambiguous match found

Thanks Martin Bell! VS found it easily with the 'Convert to web application'.

Monday, September 10, 2007 9:07 AM by Pia Nilsson

# re: Ambiguous match found

Had the same issue with UserControls, showing up as ambigous name. Any Ideas ?

Monday, October 08, 2007 3:09 PM by shiv

# re: Ambiguous match found

I tried the following trick and it works. Thanks.

re: Ambiguous match found

Hi, I had the same problem. It turned out to be a different resolution: The web site was configured for .NET 2.0 instead of .NET 1.1 (as the case for this old project). Changed it in IIS Settings (ASP.NET tab) and fixed. May help someone else.

Tuesday, October 09, 2007 5:01 PM by Jane

# re: Ambiguous match found

Thanks! Solved my issue.

As a tip on how to FIND the conflicting names: when you type "this." in some method, Intellisense pops up a list of members. In VS2005 this is sorted in a case-insensitive manner. So the conflicting names are right beside each other.

Thursday, October 11, 2007 4:55 AM by Hans Kesting

# re: Ambiguous match found

Thanks for the solution and also thanks for the Hans Kesting tip.

Friday, October 12, 2007 2:14 AM by vk

# re: Ambiguous match found

Thanks a lot Peter. Your post helped solve my problem very quickly.

I also liked the following tip:

"Thursday, October 11, 2007 4:55 AM by Hans Kesting"

Monday, October 15, 2007 8:36 AM by karthick

# re: Ambiguous match found

I have developed one web application using ASP.Net 2003 and v1.1. Yestarday, I hosted this application to some other web server (remote).After deployment, I am getting Parser Error: Ambiguous match found but the same application is working in my system now also. Please give suggestion!!!!!

Wednesday, October 17, 2007 7:02 AM by Jinesh

# re: Ambiguous match found

Thank You very much Peter. You know it helped me a lot, coz I wasted lot of time in fixing this error but all gone in vain. I once again thank you.

Wednesday, October 24, 2007 11:11 AM by Saleem

# re: Ambiguous match found

Rockin!  The twenty second solution to what I dreaded would have been a killer...

Wednesday, November 14, 2007 9:49 AM by Matthew

# re: Ambiguous match found

It's the problem with ASP.NET version

Saturday, December 01, 2007 2:40 AM by Kannan

# re: Ambiguous match found

Thank you.

Thursday, December 06, 2007 4:32 PM by Henry Erich III

# re: Ambiguous match found

Thanks! This solved my problem as well!

Wednesday, January 16, 2008 5:37 PM by xigam

# re: Ambiguous match found

Thank you very very much, I had the problem where a private variable had the same name as a control i.e bool btnhelp and WebControl BtnHelp and it only happened on a .net 2.0 website, 1.1 did not complain

Wednesday, January 30, 2008 2:03 PM by fran

# re: Ambiguous match found

Thanks very much for this info, i had a dropdownlist on a page with the name GroupList, which clashed with an object in the code behind page called groupList

Thursday, January 31, 2008 6:40 AM by Mike

# re: Ambiguous match found

Thx a lot Your'e a coding time saviour ;-)

Monday, February 18, 2008 2:36 AM by Chaos

# re: Ambiguous match found

This was a great post. Saved me heaps of time. The error itself is terrible though.

Tuesday, March 04, 2008 10:20 PM by Anil

# re: Ambiguous match found

I had the same error. Had a hard time finding it since the name with variant case was distributed in the aspx and code behind.  

Thanks a bunch! Saved me a lot of time...

Wednesday, March 05, 2008 12:39 PM by Sven

# re: Ambiguous match found

WOW!!! Thanks! Saved us lots of time,

Sunday, March 30, 2008 8:21 PM by niusha

# re: Ambiguous match found

HOLY COW BATMAN!!!!!!

This came up as the first item in my google...

Read it... THought Hmmmmmm....

Went to my members drop down in the ide, and slowly scrolled down... and there it was same name just cased differently!!!! changed the one variable name and POW!!  running like a champ!!!!!!!

THANK YOU !!!!!!!!!!!!!!!!!!!

Monday, May 05, 2008 1:03 PM by BillyDvd

# re: Ambiguous match found

Thanks So Much!  Maybe the error should be changed to Ambiguous Error Message Found, just to make things clear :-}

Unfortunately Eran Sandler's blog is gone, but the duplicate name issue is also what i had.

Thanks Again!

Bill

Thursday, June 05, 2008 12:29 PM by Bill

# re: Ambiguous match found

Muito obrigado

Wednesday, June 11, 2008 7:10 PM by Felipe Mazzi

# re: Ambiguous match found

My version of the problem was that the wrong level of .net was specified for the app (2.x instead of the correct one, 1.x.  It would have taken me a long time to figure that out, without the help here.  Thanx.

Thursday, June 12, 2008 10:23 PM by Mike K

# re: Ambiguous match found

Easiest way to find the case mismatches is just try "Convert to Web Application" on that particular page, .NET designer will show you the variable name! :)

Thanks!

Manohar

Tuesday, June 17, 2008 5:20 AM by Manohar

# re: Ambiguous match found

Life saver

Thursday, July 24, 2008 5:58 AM by Saurabh

# re: Ambiguous match found

Thanks for your kind information

Monday, October 13, 2008 10:50 AM by SatS

# re: Ambiguous match found

Thank u man. Good solution .

Wednesday, November 05, 2008 8:49 AM by Kumar

# re: Ambiguous match found

Hah.. I remember doing this before, thanks for the memory.. I just did it again! DOH

Thanks..I am such a bonehead

Thursday, November 13, 2008 1:46 PM by Jeff

# re: Ambiguous match found

Worked for me too, thanks!

Tuesday, November 18, 2008 11:22 AM by Chris

# re: Ambiguous match found

I used the “Convert to Web Application” it caught about 10 of name conflicts and I still got this error.  But sure enough it missed one and gave me this same error.  Having used the “Convert to Web Application” didn’t think of looking for an additional conflicting name.  I deleted the extra one and works grate now. Thanks

Tuesday, November 25, 2008 5:13 PM by David Tuel

# re: Ambiguous match found

What worked for me was running

aspnet_regiis -r

in the WINDOWS\Microsoft.NET\Framework\v* folder for the appropriate version of .NET to update script maps.  I did not have to change any code.  My problem was evidently due to running an older version of my application that needed v1.1.4322 while v2.0.50727 was still installed (left over from a previous run with a newer version).

Wednesday, November 26, 2008 11:42 AM by Tom Godfrey

# re: Ambiguous match found

Thanks a lot, it's works great !

Monday, December 01, 2008 7:53 PM by Filimindji

# re: Ambiguous match found

Thank you sooooo much.

That's the bad things of copy-pasting code without even changing it at least to your style / coding standards. argghhh....

Sunday, December 21, 2008 9:02 PM by Thodoris

# re: Ambiguous match found

so sad ...the blog had been removed... Dunno how to solve it now

Friday, December 26, 2008 1:58 AM by Goober

# re: Ambiguous match found

Goober:

Sure enough, Eran Sandler's blog is gone.

But read my post carefully--the problem is having two variables with the same name differing only by case, like myRepeaterControl and MyRepeaterControl. You solve it by removing/renaming one of them to a "more distinct" name.

--Peter

Sunday, December 28, 2008 11:23 AM by pjohnson

# re: Ambiguous match found

Thanks a lot! Worked like a charm.

Monday, January 12, 2009 6:46 PM by Karen

# re: Ambiguous match found

Thanks!

Wednesday, January 21, 2009 6:22 PM by anon

# re: Ambiguous match found

Monday, March 02, 2009 5:44 PM by fractalnavel

# re: Ambiguous match found

Thanks for this.  In my case I'm pretty sure that the conversion tool itself generated the error.  If it gave a warning i either missed or ignored it :-)  I had a control on the .aspx page differing in case from the C# class.  I suspect the tool added the ASP control to the designer class, then failed to match and remove it from the original C# class file, leaving two ambiguous controls.   I had to binary chop the ASP to locate the offending control, but afterwards I realised that a careful reading of the class in Object browser would have found the "duplicate".  Woudl have been nice if the error message had *named* the ambiguous control :-)

Wednesday, March 11, 2009 12:41 PM by John A Fotheringham

# re: Ambiguous match found

Sehr wertvolle Informationen! Empfehlen!

Saturday, March 14, 2009 12:39 AM by ...

# re: Ambiguous match found

I solved the error by returning to .NET Framework 1.1 of which the aplication was written for.

Friday, April 03, 2009 12:13 PM by E. Burlan

# re: Ambiguous match found

You and Evan are kings among men!! Luckily your page was the second one I checked after having this problem!! Thanks!

Friday, April 03, 2009 11:46 PM by Chris

# re: Ambiguous match found

Even thou my problem was the same the solution of it was different. In my case it was returning the infamous error because I named a column in my table (SQL Server 2005) as being "Tag". It looks like that the parser was making confusion while running my .netTiers application. I renamed it to "Description" and it worked out.

Cheers!

Monday, April 06, 2009 3:07 PM by Juba

# re: Ambiguous match found

Thanks for this wonderful blog.. It instantly solved my problem. The problem occured whicle publishing the web site , there was an unused hidden field that was specified with the same name as of the string variable in codebeind.

I removed the hidden variable and now its working... Thanks again...

Tuesday, April 14, 2009 4:54 AM by Shikha Kalyan

# re: Ambiguous match found

Almost three years old, and yet this post continues to save people (myself included) from hours of frustrating wild goose chases.  Thank you both, Peter and Eran!

Friday, May 08, 2009 11:55 AM by Steve

# re: Ambiguous match found

Hey ...thanks for the post, I had the same problem after migrating an web app from asp.net 1.1 version to asp.net 2.0. After reading this blog, i checked my code and yes i found variables with same name ,but differed in case.Hope Microsoft will have a look at this issue and makes a better compiler

Tuesday, May 12, 2009 10:08 AM by Pravin

# re: Ambiguous match found

Great post! You solved my issue caused migration from .net 1.1 to .net 2 in a webapps.

Also I had 2 variables with the same name, but different case. Now it works perfectly.

It is a very absurd bug, I would have never solved it alone...

Thank you

Tuesday, May 19, 2009 11:24 AM by Giorgio T

# re: Ambiguous match found

Just a quick tip for tracking the problem...if you catch the first chance exception in visual studio and then load the symbols for System.Web (right click on the call stack and load the symbols from the symbol server) you can see the call parameters which have the name of the class and property in conflict

Tuesday, July 07, 2009 1:33 AM by Geoff Mc

# re: Ambiguous match found

Bless you. You probably saved me an entire day of troubleshooting.

Thursday, July 23, 2009 12:58 PM by Josh

# re: Ambiguous match found

Many thanks Peter - this little gem saved me a lot of hassle :)

Thursday, July 30, 2009 9:28 AM by Darren B

# re: Ambiguous match found

Hi,

  I have a large website with many pages. I found this problem during runtime by chance when I navigated to a page that had the naming conflict. However, there could be many more pages in my application that might have the same problem and blow up at runtime. Is there a way to catch the conflicts at compile time or any other way I could find all the possible conflicts in my entire website?

   Thanks

Wednesday, August 05, 2009 11:10 AM by Abraham L

# re: Ambiguous match found

THXXX!

now it's working again ^^

Monday, August 10, 2009 9:05 AM by unkown

# re: Ambiguous match found

You can download a build task to catch this at compile time:

www.onpreinit.com/.../ambiguous-match-found_30.html

Thursday, October 01, 2009 9:05 AM by Nariman

# re: Ambiguous match found

Thanks a lot, this helped me, i was frustrated with this problem. Thanks once again. keep up the good work.

Thanks

Thursday, October 15, 2009 10:09 AM by Ahmed

# re: Ambiguous match found

You sir solved my problem.

+1

Thursday, October 15, 2009 11:16 AM by Mathlec

# re: Ambiguous match found

Thank you so much... I know this is an older post, but this saved me more insanity than you will ever know.  God Bless You, Sir.

Thursday, October 15, 2009 3:33 PM by SBasham

# re: Ambiguous match found

Please check ur site may be mapped with wrong framework.

Monday, November 30, 2009 4:50 AM by Aman

# re: Ambiguous match found

fractalnavel,

Thanks for the updated URL! I've updated the post accordingly.

--Peter

Thursday, December 10, 2009 5:44 PM by pjohnson

# re: Ambiguous match found

Hi,

My fix was resolved by Unchecking "Allow this precompiled site to be updated" through Publish Web Site.

Thanks a ton for the help.

Friday, May 07, 2010 4:47 AM by Sunil Raheja

# re: Ambiguous match found

Hi,

I'm glad I've come across this page. It helped me figure out where the issue was because the error didn't always occur.

For me I was inheriting an object and also defining properties with the same name.

Thanks. You saved my day.

Wednesday, May 26, 2010 4:50 AM by Felician Balint

# re: Ambiguous match found

Thanks. it work like a magic on me.. thanks alot

Thursday, May 27, 2010 4:22 AM by Rencie Bautista

# re: Ambiguous match found

Great post Peter! I could solve my problem within minutes... Otherwise this could have taken a quite enough time to work around. Thanks a lot. Keep the great work up! :)

Just a note, as in my case the problem was between: LinkbuttonCancel & LinkButtonCancel, and to find this I did not use the reflector or WinDbg. I simply tried with deleting my *.designer.cs file of the page giving this exception and then I right clicked the same page's aspx file and used the option "Convert to web application" (after deleting designer.cs file you would see this option). This option creates designer file for you and while creating it would notice the difference between the ambiguous fields and an alert would come like:

"Generation of designer file failed: Control LinkbuttonCancel conflicts with field LinkButtonCancel of a different case. Declaring both fields will result in an ASP.NET error."

And this is what I was looking for....

Thursday, May 27, 2010 4:55 AM by Ashish

# re: Ambiguous match found

Ashish,

Thanks for the kind words! And for the note about the Visual Studio warning. It sounds like they've updated VS to detect when you're going to get this vague error before you actually get it, a decent "band aid" warning short of what I would consider a "true" fix of making the error message more helpful. What version of Visual Studio are you using?

--Peter

Thursday, May 27, 2010 8:46 PM by pjohnson

# re: Ambiguous match found

Helped me solve my problem.

It turned out I defined a drop-down list named Country on aspx. On the aspx.cs, I was busy copy/pasting and I accidentally declared it as

protected System.Web.UI.WebControls.TextBox Country

Once I changed it to DropDownList, error went away.

Tuesday, June 29, 2010 6:59 PM by Joel

# re: Ambiguous match found

This helped me so much.  The solutions I was finding on other pages were wrong for my problem.  Once I saw your solution, everything clicked!

Thursday, July 01, 2010 9:56 AM by Vicky

# re: Ambiguous match found

thanks for the soln..

i tried to find it hard and found one protected variable that too, Form1 , with differnt case in the two files :$

Tuesday, July 13, 2010 2:48 AM by charu

# re: Ambiguous match found

Thanks a lot! It was one day of work to find out that it was due to 1.1 code running in 2.0 version in iis. But it was giving issue only in one page. When I changed to 1.1 it worked for me but the real issue was having two same named labels declaration with case mismatch.

Tuesday, July 13, 2010 12:25 PM by Amrita

# re: Ambiguous match found

i had the problem

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:  <%@ page language="C#" autoeventwireup="true" inherits="ContactUs_Default, App_Web_a4fpjxoc" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

Line 2:  

Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">

Wednesday, September 22, 2010 10:01 PM by jayanthi

# re: Ambiguous match found

Thanks Martin Bell.  I spent an entire day correcting case-sensitive markup errors.  I knew my problem was in the markup, but could not figure out what control was causing it.  Your post make the most sense.  That was a cool trick and it fixed my problem.

Thursday, January 20, 2011 2:24 PM by rrlevron

# re: Ambiguous match found

Bingo!  Your post is almost 5 years old and is still helping people!  How the heck  you figured out the cause of the issue in the first-place with that completely useless error message is beyond me.  This could have cost me a couple days of head-scratching, easy.

Hat's off and thank-you!

Tuesday, April 05, 2011 2:53 PM by Jon Swoveland

# re: Ambiguous match found

Thank u, Peter. and thanks a lot to Eran.

You guys are life saving..

Monday, June 20, 2011 12:39 PM by ankith83

# re: Ambiguous match found

Thanks Man

It Save My Lot of time

Tuesday, September 06, 2011 1:47 AM by Amit

# re: Ambiguous match found

I have the same problem but does not have such case sensitive issue as explained above. Still struggling :(

Thursday, September 15, 2011 9:31 AM by vikas.khanna03

# re: Ambiguous match found

Thanks. This helped me in identifying the same issue I faced in my page.

Friday, September 30, 2011 11:42 AM by lmuthu

# re: Ambiguous match found

incase if anybody still gets error

this might help

the-blueclouds.blogspot.com/.../vs2003-to-vs2005vs2010-conversion.html

Wednesday, December 28, 2011 9:35 AM by Blue Clouds

# re: Ambiguous match found

Awesome Post!!

Saved me a lot of searching and frustrating moments.

Thanks a million Peter!!

Wednesday, February 08, 2012 4:43 AM by girijaa

# re: Ambiguous match found

My fix was resolved by Unchecking "Allow this precompiled site to be updated" through Publish Web Site.  Uploaded code to production server and everything worked fine.

Wednesday, February 08, 2012 12:27 PM by satheesh

# re: Ambiguous match found

I've the same problem and it solved and the solution is in check your code behind and you will find a couple of Controls with the same name:

protected Button Home;

protected System.Web.UI.HtmlControls.HtmlAnchor home;

you have to erase one line or comment it.

thanks a lot.

Saturday, April 21, 2012 5:54 AM by Abd ul Aziz Kasem and Mohamed Ali

# re: Ambiguous match found

Thanks we always need your help

Friday, May 11, 2012 6:19 AM by thanks

# re: Ambiguous match found

I had same problem, but by following your post, i Commented all code and checked step by step and found the names of the session and global variable were same, after changing them its working now :)

Thursday, July 26, 2012 12:45 AM by Sooraj

# re: Ambiguous match found

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:  <%@ page language="C#" autoeventwireup="true" inherits="Online, App_Web_gjvks02a" %>

Line 2:  

Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">

Source File: /online.aspx    Line: 1

i have a error like that on server.......pls help me

Thursday, September 27, 2012 5:24 AM by amol

# re: Ambiguous match found

Wow, that was exactly the problem.. Thanks a ton Peter! Really saved a lot of time :)

Monday, March 11, 2013 4:22 PM by Janhavi

# re: Ambiguous match found

I don't know whether it's just me or if perhaps everyone else encountering problems

with your blog. It looks like some of the text within your content are running off the screen.

Can someone else please comment and let me know if this

is happening to them too? This might be a problem with my browser because I've had this happen previously. Many thanks

Saturday, April 27, 2013 8:22 PM by Watters

# re: Ambiguous match found

Asking questions are really good thing if you are not understanding something entirely, except

this article gives pleasant understanding yet.

Tuesday, April 30, 2013 7:44 PM by Fuchs

Leave a Comment

(required) 
(required) 
(optional)
(required)