Tuesday, 6 November 2012

Ambiguous match found in aspx page

Today somebody made merged in some changes to one of the web projects and we started getting the error below, well, at least that is what I think happened as the developer who checked in the last code claims that it works fine in his machine, at any rate the 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: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="BookApp._Default" %>

Source File: /Default.aspx Line: 1
It turns out that the source of this error was a gridview and a list (data source of the gridview) that shared the same named but with different capitalization (myObjects and MyObjects respectively).

This is due to a reflection call that ignores casing, see this post for a full explanation.

No comments:

Post a Comment