Linq.Dynamic Not Working on Webserver RRS feed

  • Question

  • I have the following code which works fine on my local machine but not on the webserver (the CityList object is a List<T> object).
     var results = CityList.AsQueryable().GroupBy(columnString, "it").Where("Count() > 1").Select("it");
                        foreach (object o in results)
    //This line errors out
                            if (o.GetType().GetProperties()[0].GetValue(o, null) != null)  
    //It says Index outside bounds of array 
    //On my local machine the count for the GetProperties is one on the webserver it is zero 
    //When I print out the type name it is the same on both
    I've starting looking at the assemblies on my machine vs. the webserver and they all look the same as far as versions. Does anyone have any ideas? The Lists are the same when the error occurs vs. when it doesn't . The only difference is the machine they are running on.

    Tuesday, January 26, 2010 10:40 PM