New Posts New Posts RSS Feed: LinqDataSource
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

LinqDataSource

 Post Reply Post Reply
Author
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Topic: LinqDataSource
    Posted: 31-Mar-2008 at 10:13pm
I am trying to use a LinqDataSource to query one of my Entity Sets in my Entity Manager and I have it setup to go through the BOS.  I have been able to get a similar query to work using the LINQ to Entities directly within my ASP.NET app, but when I try to access a page that uses the LinqDataSource, I get the following error:

Exception Details: System.ServiceModel.FaultException: Could not load file or assembly 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Stack Trace:

[FaultException: Could not load file or assembly 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
IdeaBlade.EntityModel.v4.RemoteEntityServerProxy.CheckConnection(Exception pException) +161
IdeaBlade.EntityModel.v4.EntityServerProxy.Fetch(SessionBundle pBundle, IEntityQuery pQuery) +114
IdeaBlade.EntityModel.v4.EntityManager.ExecuteServerQuery(IEntityQuery pEntityQuery) +77

[EntityServerException: Could not load file or assembly 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
IdeaBlade.EntityModel.v4.EntityManager.HandleEntityServerException(Exception pException, Boolean pTryToHandle, PersistenceOperation pOperation) +190
IdeaBlade.EntityModel.v4.EntityManager.ExecuteServerQuery(IEntityQuery pEntityQuery) +105
IdeaBlade.EntityModel.v4.EntityManager.ExecuteFetch(IEntityFinder finder) +182
IdeaBlade.EntityModel.v4.EntityQueryFinder.Execute() +311
IdeaBlade.EntityModel.v4.EntityManager.ExecuteQueryCore(IEntityQuery query, QueryStrategy strategy) +236
IdeaBlade.EntityModel.v4.EntityManager.ExecuteQueryForScalar(IEntityQuery query, QueryStrategy strategy) +37
IdeaBlade.EntityModel.v4.EntityManager.ExecuteQueryForScalar(IEntityQuery query) +32
IdeaBlade.EntityModel.v4.EntityQuery`1.Execute(Expression expression) +260
System.Web.Query.Dynamic.DynamicQueryable.Count(IQueryable source) +139
System.Web.UI.WebControls.DynamicQueryableWrapper.Count(IQueryable source) +6
System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelectAutoSortAndPage(IQueryable source, DataSourceSelectArguments arguments) +127
System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelectQuery(LinqDataSourceSelectEventArgs selectEventArgs, Object selectResult, Object table, Boolean storeOriginalValues) +308
System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +482
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041

Does anybody have any idea what this error is about and how I might fix it?  I don't have any assembly called DynamicClasses so I don't know why its trying to reference it.

Thanks,

Dan
Back to Top
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Posted: 02-Apr-2008 at 7:40pm
I figured out a workaround for the error that I was getting.  I originally had the LinqDataSource declared as:

<asp:LinqDataSource ID="LinqDataSource1" runat="server"
            ContextTypeName="HEDataIB.HEDataSet" OrderBy="Name_LastName, Name_FirstName"
            Select="new (MemberId, Name_LastName, Name_FirstName, CipStatus, CipScore, Gender)"
            TableName="Members" Where="CipStatus == @CipStatus">
            <WhereParameters>
                <asp:Parameter DefaultValue="Failed" Name="CipStatus" Type="String" />
            </WhereParameters>
        </asp:LinqDataSource>

and that was causing me to get the above error.  But if i remove the "Select" phrase, it works correctly.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down