views:

52

answers:

1

The page that I'm currently working on searches for various entities based on what portfolio they are in. In order to apply the other search criteria (besides for Portfolio) the page first gets the entities by portfolio and then applies the criteria to them, as shown here:

IPortfolioLogic logic = this.objectFactory.GetObject<IPortfolioLogic>(this.dal);
PortfolioEntity portfolio = logic.GetPortfolioByID(this.context, this.dal, requestDto.Portfolio.UniqueID);
var unfilteredEntities = portfolio.EntityGroupEntity.EntityGroupItemList.Select(i=>i.EntityID);
IList<EntityEntity> entities = criteria.ApplyTo<EntityEntity>(unfilteredEntities);

This last line sends it to this code:

public IList<T> ApplyTo<T>(IEnumerable<T> list) {
        IList tmpList = this.ApplyTo(list, typeof(T));

        IList<T> resultList;

        if (tmpList == null) {
            resultList = null;
        }
        else {
            resultList = new List<T>();

            foreach (object tmp in tmpList) {
                resultList.Add((T)tmp);
            }
        }

        return resultList;
    }

public IList ApplyTo(IEnumerable list, Type entitiesType) {
        return this.GetEvaluator().ApplyTo(list, entitiesType);
    }

From here it goes and grabs those specific entities related to the portfolio that also match the criteria.

On my local machine this works perfectly. It finds the entities, and does the criteria on them. On our farm, though, this message shows up:

Message: Error #0e3c57ad-a834-47ab-996a-deecb80fccca
Ambiguous match found.:

In the stack trace that gets printed out it goes to those lines mentioned above. All of the other locations are frequently used by other processes and none of them have experienced this problem before. The lines mentioned above are the only thing different.

Any ideas?

+1  A: 

You probably have a mix of different versions.

Try re-deploying all of the assemblies.

SLaks
The problem is that I've had this issue for the last few days, and the server's assemblies get deployed every day or so.
IronMan84
App could still have a reference to a prior version of the assembly if your deployment process doesn't recycle the app pool or iisreset.
Jesse C. Slicer
I just went over to the QA people and they restarted the services. Still getting the error.
IronMan84