Loading great amount of items with DomainDataSource

Loading great amount of items with DomainDataSource

Postby Yurii » Fri 09 Apr 2010 11:39

I have a trouble, when loading more then 3000 (sometime less) items with the help of DomainDataSource:

x:Name="accountDataSource"
QueryName="GetACCOUNTListEx"
AutoLoad="False"
LoadSize="3000"
PageSize="100"
>


Following Error is rising:

Load operation failed for query 'GetACCOUNTListEx'. There was no endpoint listening at http://localhost:6312/ClientBin/DomainS ... svc/binary that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. In Silverlight, a 404 response code may be reported even when the service sends a different error code.
And there is no inner exception

But when you load less items (10,100 or 500) everything is OK

Using:
dotConnect Version 5.35.79 (14-Jan-2010)
Silverlight 3 Toolkit November 2009

Please, help me to solve this.
Yurii
 
Posts: 7
Joined: Wed 17 Mar 2010 14:22

Postby Shalex » Mon 12 Apr 2010 12:11

1. Please check your connection string. Did you change the Default Command Timeout parameter that should be set to 0 by default? Try setting it explicitly in your connection string: "Default Command Timeout=0;".
2. Are there any detailed errors in the eventlogs reported by IIS/Asp.Net? You can find these logs in the following way: Control Panel > Administrative Tools > Computer Management | System Tools | Event Viewer | Application.
3. Try the latest version (5.60.120) of dotConnect for Oracle. Does the problem persist with this version as well?
4. Please send us a small test project with the DDL scritpt of your database objects to reproduce the issue in our environment.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby Yurii » Tue 13 Apr 2010 15:03

I have found the problem.
Entity framework has limit of downloading size of data.
More heavily oracle Table, from which you want to get data, less data you can download on client with the help of DomainDataSource. How it is possible to remove this restriction? May be exists some configurations.

oracle script:

-- Create table
create table ERRDOWNLOADMANYITEMS
(
ID NUMBER(12) not null,
NAME NVARCHAR2(100) default 'NAME',
VAL NVARCHAR2(300) default 'newkdjf',
CURRENCY NUMBER(12) default 123234,
STATUS CHAR(1) default 'E',
DEBCRED CHAR(1) default 'S',
DTPD DATE default SYSDATE,
NDOC NUMBER(12),
TYPEPD NVARCHAR2(1),
NPD CHAR(1)
)

-- Create/Recreate primary, unique and foreign key constraints
alter table ERRDOWNLOADMANYITEMS
add constraint PK_ERRDOWNLOADMANYITEMS primary key (ID)
;


data script:

insert into errdownloadmanyitems ("ID","NAME") values (0,' name ' );

I have in DB 10259 items. Error is rising when downloading 7200 items
Yurii
 
Posts: 7
Joined: Wed 17 Mar 2010 14:22

Postby Shalex » Thu 15 Apr 2010 12:17

Please increase the value of the maxItemsInObjectGraph element:
http://msdn.microsoft.com/en-us/library/ms731809.aspx.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby Yurii » Mon 19 Apr 2010 08:34

Yes. It is true. It fine works with wcf services, and Ria services.
But in domain services, I wonder how to set this property.
There is no setting parameter in web config for domain service.
I can not set







Moreover, on client i can not set binding:
WebDomainClient(uri, false);
WebDomainClient has only private constactor WebDomainClient(uri, false, binding);

On server side i can find endpoint
ServiceEndpoint endpoint =
context.Host.Description.Endpoints.Find(
context.EndpointDispatcher.EndpointAddress.Uri);

How can i set to endpoint Behavior with MaxItemsInObjectGraph i wonder.
Yurii
 
Posts: 7
Joined: Wed 17 Mar 2010 14:22

Postby Yurii » Mon 19 Apr 2010 12:55

I found solution!!!! :D

In constructor of domain service you should write code to config services.
First of all find all server endpoints
OperationContext.Current.Host.Description.Endpoints
Current client URI-request
OperationContext.Current.EndpointDispatcher.EndpointAddress.Uri

By Uri you can find requested endpoint and set behavior property of operation.

foreach (OperationDescription description in endpoint.Contract.Operations)
{
foreach (var behavior in description.Behaviors)
{
var b = behavior as DataContractSerializerOperationBehavior;

if (b != null)
b.MaxItemsInObjectGraph = int.MaxValue;
}
}


Thanks :)
Yurii
 
Posts: 7
Joined: Wed 17 Mar 2010 14:22


Return to dotConnect for Oracle