Large datasets published with OData WCF Data Services and Excel PowerPivot
I want to publish an SQL Server database, for testing purposes AdventureWorksDW
, 开发者_如何学JAVAthe data warehouse sample database that provides Microsoft. I created a new "WCF Data Service" project in VS and created an Entity Framework Model to pass it into the generic parameter of DataService
base class. I included in the model some dimensions and the facts table FactInternetSales
. It seem that FactInternetSales table contains too much data (60398 records) to be accessed through OData by default. When I try to iterate the FactInternetSales entity set from a console app, I get an System.Net.WebException
with the message:
The underlying connection was closed: The connection was closed unexpectedly.
If I limit the numbers of rows to iterate, said 1000, I have not problem.
On the other hand, when I try to load the data from FactInternetSales into PowerPivot using this OData Service, I get this error message:
Unable to obtain schema for data feed 'FactInternetSales'. Please make sure this feed exists.
In the InitializeService
method of the OData Service I have set config.SetEntitySetPageSize("*", 1000000)
, but it seem don't have any effect. I added also the following code to the service's web.config, without success:
<system.web>
...
<httpRuntime maxRequestLength="40960" />
</system.web>
...
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true">
<requestLimits maxAllowedContentLength="2147483647" />
</requestFiltering>
</security>
</system.webServer>
I guess it is a matter of configuration to allow this amount of data flow through the OData Service, but I can't find tho good place where I should change the default behavior.
精彩评论