Error: Ambiguous match found.

G

Guest

Hi!
I receive this error in my webapp:

Ambiguous match found.
At line:
Line 1: <%@ page language="C#"
masterpagefile="~/memberscontents/master_interna.master"
autoeventwireup="true" inherits="members_contents_user_profile,
App_Web_user_profile.aspx.73f80179" title="Untitled Page" %>

Somebody can help?
Thanks
Alexandre
 
G

Guest

Alexandre said:
Hi!
I receive this error in my webapp:

Ambiguous match found.
At line:
Line 1: <%@ page language="C#"
masterpagefile="~/memberscontents/master_interna.master"
autoeventwireup="true" inherits="members_contents_user_profile,
App_Web_user_profile.aspx.73f80179" title="Untitled Page" %>

Somebody can help?
Thanks
Alexandre

I am having the same problem but only on 1 site did you get any where in
sloving the issue?
 
G

Guest

Hi,

It seems like you have two variables in your page that differ only in the
case. For example, in your aspx page, you might have

<asp:TextBox ID="UserID" runat="server"/>

and in the code behind file you might have

private Int32 userID = 0;

Note that in my example, even though the variables have different
accessiblity and types, the variable names are similar (the difference is
only in the case).

In my opinion, this is a bug - C# is case sensitive and the above code is
perfectly legal from the point of view of the C# compiler. This explains why
it works as intended from within the VS 2005 IDE. The aspnet_compiler too
does not report any errors when you try to compile you website. However, some
error in the reflection mechanism causes a case insensitive search and that
is the reason for this "Ambiguous match found." error.

Try going through your code carefully and get change variable names that
differ only in their case. You should be fine.

Jim Chundevalel
 
G

Guest

I did think of but it very had to find when you have to look through a number
of 2-3 tiered inheritance classes but I could not find anything will have a
closer look.

This appication is on 6 sites and it is only one is giving be the trouble?

Any other thing it could be.
 
Joined
Oct 1, 2009
Messages
1
Reaction score
0
Fix - Use MS Build Tasks

You can download a custom build task to catch this at compile time - search for this error at OnPreInit dot com.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top