.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Unable to retrieve large amounts of data?

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :WCF

We're using WCF with 'basicHttpBinding', and have set the maxBufferSize, maxReceivedMessageSize to 99999999. We've also set the ReaderQuota maxArrayLength to 99999999.

The method I'm calling is supposed to return an array of objects with a couple containing a few small strings, and a couple of bools and integers. If the array is less than ~500 elements, I don't have a problem, and I receive all of my data. However if the array is of any meaningful size, then I get the following CommunicationException:

"The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error."

I'm thinking that I might need to retrieve the array's in manageable chunks, but before I start that rewrite process, I'd like to see if there would be a way to get this done.

View Complete Post

More Related Resource Links

How to retrieve data from SqlDataSource and pass to a variable?


Hi there,

I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:

    <asp:SqlDataSource ID="sdsFormOrderDetails" runat="server" 
ConnectionString="<%$ ConnectionStrings:ForexDB %>"
ProviderName="<%$ ConnectionStrings:ForexDB.ProviderName %>"
SelectCommand="usp_GetOrderDetails" SelectCommandType="StoredProcedure"
UpdateCommand="usp_UpdateOrder" UpdateCommandType="StoredProcedure"
<asp:ControlParameter Name="orderId" ControlID="grdOrders" PropertyName="SelectedDataKey.Value" />
<asp:ControlParameter Name="orderId" ControlID="frmOrderDetails" PropertyName="SelectedValue" />

Data Points: Using XQuery, New Large DataTypes, and More


SQL Server 2005 introduces a lot of new features, but it also enhances the popular and oft-used Transact-SQL (T-SQL) language. Changes include the introduction of new datatypes to store large values using the MAX indicator, the integration of enhanced XML querying and data modification with XQuery, and the new XML datatype.

John Papa

MSDN Magazine March 2006

Multiprocessor Optimizations: Fine-Tuning Concurrent Access to Large Data Collections


Application performance involves more than just speed. In a Web server environment, top performance also means ensuring that the maximum numbers of users can be served concurrently. This can be accomplished through efficient use of multiprocessor machines and thread management. This article presents techniques that can solve a number of concurrency problems. One approach, using thread management, controls access to a database on a per-thread basis, which protects the integrity of the data. In the article, reusable thread classes are built and presented. The classes are then tested and their performance in a live environment is examined.

Ian Emmons

MSDN Magazine August 2001

Crystal Reports can grow fields with large amounts of text layout problem


A can grow field in the details section of a crystal report may have so much text that the section will be larger than the remaining space available on the page (the space below the previous record).  The section has vertical lines on it with Extend to bottom of section when printing set to true.  The section starts on a new page (and may continue on the following one).  I want it to start on the page where the last record was laid out, and continue to the new page without leaving a gap with vertical lines on it.  I'm using Crystal Reports 9 and I can't work out how to do it. Has anyone got a solution?

Programmatically retrieve data from the associated row in SharePoint and use the data to do math


I am trying to pull all of the associated data from a SharePoint list row to an InfoPath form repeating table.  I would like to select 1 unique value from the row and have the other fields auto-populate with the associated data from that row. 


SharePoint Columns and also names of InfoPath fields 1, 2, 3, 4, 5, 6, 7.

I have a dropdown that is connected to column 1 and I would like to select 1 and have it populate the rest of the fields from that row.  I am currently doing this with information and C# code from:  http://www.bizsupportonline.net/infopath2007/sharepoint-list-retrieve-value-same-row-repeating-table-infopath

Data form web part not displaying - Unable to display this Web Part. ....



I am designing a data form - adding some formatting etc.  I am able to see the webpart correctly in SPD split view, but when I trying to preview it, it gives me the following error

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.
ANy help would be welcome, I have spent a lot of time on this page and don't want to do it again.  THere are a lot of fields and it's a tedious process to move them to the correct location.  I am at my wits end, I am not sure how to debug this!!


Unable to validate data


Hi All,

Thank you for advance.

I created the web application using asp.net 2.0, c# and sql server 2005

sometimes i am getting the following error,

Message: Unable to validate data.

Source: System.Web

TargetSite: Byte[] GetDecodedData(Byte[], Byte[], Int32, Int32, Int32 ByRef)

StackTrace:    at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
   at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)

How can i add a textbox into a GridView Cell dynamically and how can i retrieve entred data

Hey, i think that the the subject can explain what i need, it's about adding a TextBox control with the code behind into a GridView, and also about how can i retrieve entered data after submitting, im using C#,Thanks.

System.IO.IOException: Unable to read data from the transport connection

Hello,   I have an xml webservice calling another xml web service and occasionally i get the following error - any ideas why?Does this happen when the request is made or when reading the response? Also how i can prevent it from happening? Thanks   System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)   --- End of inner exception stack trace ---   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)   at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean readToUserBuffer)   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)   at System.Xml.XmlTextReaderImpl.ReadData()   at System.Xml.XmlTextReaderImpl.InitTextReaderInput(String baseUriStr, TextReader input)   at System.Xml.XmlTextReaderImpl..ctor(String url, TextReader input, XmlNameTable nt)   at System.Xml.XmlTextReader..ctor(TextReader input)   at System.Web.Services.Protocols.SoapHttpClientProtocol.GetReaderForMessage(SoapClientMessage message, I

WCF issues sending large data - "An existing connection was forcibly closed by the remote host"

Hi Guys I have posted the following on www.asp.net but thought it might be productive posting here too.I have been pulling my hair out trying to fix an issue with sending data over WCF, I have read pretty much every THREAD on this forum regarding or similar to this issue without any successful solution.  I have a simple data object which has a [DataMember] with a data type of byte[]. I use this to send binary data from my web app as follows: Asp.net MVC website --> WCF Client (Has my Service References) --> My Services (MyServices.svc) --> Business/Data Tier Everything is being executed from within VS 2008 Pro.   Now I have successfully sent data up to 2.2MB, however it fails if i try and send a file such as 2.3MB or larger i get the following exceptions: General Exception Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at SoftApp.WCFClient.MyServiceReference.IMyService.Document_Save(DtoDocument dtoDocument, Int32 usercode)   at SoftApp.WCFClient.MyServiceReference.MyServiceClient.Document_Save(DtoDocument dtoDocument, Int32 usercode) in c:\dev\softapp\softapp.wcfclient\service references\myservicereference\refe

SQL 2008 R2 (final): SSMS freezes: "Failed to retrieve data for this request.

The original thread is locked for some reason--but the cause of the bug had something to do with the "ssms tools pack" add-in, which, according to the comments in the connect item, will be fixed in an update of ssms tools: http://social.msdn.microsoft.com/Forums/en-US/sqlkjdatabaseengine/thread/f65737b7-fe4d-487b-aa41-ef437d100bc7 https://connect.microsoft.com/SQLServer/feedback/details/556169/ssms-completely-locked-up-after-right-clicking-a-table  

No Way to retrieve data from oracle ref:_cursor over T-SQL and linked Server?

Hello, for an migration projekt we want to compare results from sp's from oracle and sqlsserver. Same calls should retrieve same results. Also we want build an automatic test for this. But is there now way to retrieve results from oracle sp's whit rev_cursor over linked Server? No one answer to this: http://social.msdn.microsoft.com/forums/en-us/sqldataaccess/thread/2BAC6743-8701-4476-8F36-0377A5761525   greetings Michael

Retrieve cube data directly from Relational database - is this possible?

I have a cube created in SSAS R2 2008. Now i would like to retrieve some data from this cube, using MDX language, and then to process it in Relational SQL database! Is this possible? I am new in SSAS, please help!  

Unable to consume ADO.NET Data Services from Silverlight.

Hi Everyone, I am having trouble consuming an ADO.NET Data Service from Silverlight.  I am able to get data back from a browser, but not in Silverlight. I am at a loss to figure this out.  Any help is much appreciated.  Let me know if you need more info. Thank you in advance for any help! Here is the the silverlight code: private Uri svcUri = new Uri("http://localhost:64522LocalTariffsDataService.svc"); private void ctrlViewLocalTariffs_Loaded(object sender, RoutedEventArgs e) { svcContext = new LocalTariffEntities(svcUri); svcContext.LocalTariffs.BeginExecute(OnLocalTariffsQueryCompleted, svcContext.LocalTariffs); } private void OnLocalTariffsQueryCompleted(IAsyncResult result) { Dispatcher.BeginInvoke(() => { DataServiceQuery<LocalTariffsEntityDataService.LocalTariff> query = result.AsyncState as DataServiceQuery<LocalTariffsEntityDataService.LocalTariff>; LocalTariffsEntityDataService.LocalTariff returnedLocalTarrifs = query.EndExecute(result).FirstOrDefault(); // Exception is thrown here. dgLocalTariffs.DataContext = returnedLocalTarrifs; }); } Here is the exception: < E2ETraceEvent xmlns = " http://schemas.microsoft.com/2004/06/E2ETraceEvent " >

SSRS 2008 Export to PDF fails for large data with System.Exception: Parameter is not valid

Hi, We are working on Range Bar Chart using SSRS 2008. The report has huge data. It is properly displaying the data, but when we tried to export to pdf it is failing with the following exception. Exporting to excel works fine. Also if the report has small/medium data it is property exporting to PDF. It is failing only in case of huge data (we have custom page size of 28" X 14"). Of course the report has lot of expressions we used to customize the colors/text as per our requirements.   Server Error in '/Reports_SQLDEV2008' Application. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Parameter is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [Exception: Parameter is not valid.]   [Exception: An error occurred during rendering of the report.]   [Exception: An error occurred during rendering of the report.]    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream ou

ssis sql 2000 image to 2008 varbinary Failed to retrieve long data for column

Hi, I have a task that to migrate the image type column from sql 2000 to varbinary type in sql 2008. The source column having 3812353 max datalength size for the column. The package always failed with following error message. [OLE DB Source [13177]] Error: Failed to retrieve long data for column "attch_file_content_t". [OLE DB Source [13177]] Error: There was an error with output column "attch_file_content_t" (13209) on output "OLE DB Source Output" (13187). The column status returned was: "DBSTATUS_UNAVAILABLE". [OLE DB Source [13177]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "attch_file_content_t" (13209)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "attch_file_content_t" (13209)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. Meng Chew

Unable to Show Edit item Links in Data Form Web Part

I have a DFWP connected to custom list and the boxes to Show Edit Item Links, Show Delete item links and Show Insert Item links are grayed out so that they can not be checked. This works fine when I use a DFWP connected to a standard list (i.e., Contacts). Is there something special that needs to be done to activate this functionality?ThanksDean
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend