ASP.NET parser error: ambiguous match found

I’m sure this solution won’t work every time for this bug but it’s another possible one.

Scenario: Upon loading an ASP.NET 1.1 project my colleague encountered this message: ambiguous match found.

Solution: Off we head to inspect the dll and look for any objects that have matching names using .NET Reflector. Load the web project assembly and browse to the class of the offending page. Opened it up and discovered one web user control had two entries, e.g. customControl: MyUserControl & CustomControl: MyUserControl.

The ID used in the aspx page and the one listed in the code-behind differed only in case but still VS 2003 managed to compile the project. Quick job to correct the problem by editing the ID and made it consistent, rebuild and away you go.

If the above doesn’t help then no doubt you’ve scoured the web for other solutions and now you’re here at a loss. I’d suggest looking for controls/variables whose names match other controls or even pages.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s